check if data is unique in c# code example
Example: c# check if value in dictionary are unique
var dict = new Dictionary<string, int>();
if(dict.Values.Distinct().Count() == dict.Count)
{
Console.WriteLine("values are distinct");
}
var dict = new Dictionary<string, int>();
if(dict.Values.Distinct().Count() == dict.Count)
{
Console.WriteLine("values are distinct");
}