Here is the values I am adding in Dictionary List:-
1,1000
2,2000
1,1000
3,3000
I can delete from Dictionary based on key value:-
if (i == null)
return;
var dict = app["ItemList"] as Dictionary<int, int>;
if (dict != null)
dict.Remove(i.ItemId);
Here I pass key value (i.ItemId),it deletes an item from dictionary. But When I use List of Dictionary, I couldn't delete items from List of Dictionary based on Key Value.
if (i == null)
return;
var dict = app["ItemList"] as List<Dictionary<int, int>>;
if (dict != null)
{
var itemDict = new Dictionary<int, int>();
itemDict[i.ItemUid] = 0;
dict.Remove(itemDict);
}
Note:- I have only Key value available when I am deleting from List of Dictionary.
Help will be appreciated.