アイテムのリストを取得しました。列の個別の値に基づいて (つまり、レベルに基づいて) リストをフィルター処理したいのですが、フィルター処理後にカウントを取得して int 変数として保存する必要があります。誰でも私を助けてください。
**List**
Public Class Totalitems
{
public string ItemName;
public string ItemId;
public string ItemGroup;
public int Level;
}
Id= "123asd";
List<Totalitems> l_items = this.getslist(Id);
/*How to filter based on distinct level */
/* var filteredItems = (
from p in l_items
select p.Level)
.Distinct(); */
**Finally:**
//Stores the elements contained in the List into a variable
int totalItemsafterFiltering = l_FilteredItems.Count;