I defined my class:
public class Host
{
public string Name;
}
then a strongly typed dictionary:
Dictionary<string, Host> HostsTable;
then I'm trying to compare the value:
if (HostsTable.Values.Where(s => s.Name == "myhostname") != null) { doSomething }
and the problem is that nothing was found, even I'm sure the item is in the list. What am I doing wrong?
source
share