What would the count for the list of it.
public class Test
{
string Data;
int Id;
public Test(int id, string data)
{
Data = data;
Id = id;
}
}
static void Main(string[] args)
{
List<Test> list = new List<Test>();
list.Add(new Test(10, "test"));
var d = new Test(10, "test");
if (!list.Contains(d))
list.Add(d);
Console.WriteLine("Count of the list is : " + list.Count);
Console.ReadLine();
}
}
What to do to make count 1?