C#C
C#3y ago
Chris TCC

retrieving dictionary value

I've got a dictionary that stores a string key and a bool as it's value. How do I retrieve the bool value for use in an if-statement? Currently I'm doing this:
bool tempLurkStatus;
if(lurkStatus.TryGetValue(userName, out tempLurkStatus) && tempLurkStatus == true)
Was this page helpful?