Hello All,
In below Dictionary I have a list<string> and would like to check local string within this list and if it does not contains would like to add to the list.
Can anyone please help me out with the logic in if condition
Dictionary<string, Dictionary<string, List<string>>> dictLst = new();
In below Dictionary I have a list<string> and would like to check local string within this list and if it does not contains would like to add to the list.
Can anyone please help me out with the logic in if condition
Dictionary<string, Dictionary<string, List<string>>> dictLst = new();
C#:
Dictionary<string, Dictionary<string, List<string>>> Lst = new();
if (Lst.ContainsKey(firstkey))
{
var Elem = Lst[firstkey];
if (Elem.ContainsKey(secondkey))
{
// here i would like to check the Elem.Values -> list<string> values with
// other string, if it does not contains then add string to List<string>
}
}