using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class Program
{
static void Main(string[] args)
{
var curries = new[]
{
new { M = "A", S= "C", A = 5 },
new { M = "B", S= "B", A= 5 },
new { M = "C", S= "A", A= 5 }
};
Console.WriteLine(curries[0].ToString());
Console.WriteLine(curries[0].GetHashCode());
Console.WriteLine(curries[1].GetHashCode());
Console.WriteLine(curries[2].GetHashCode());
Console.WriteLine(curries[0].Equals(curries[1]));
Console.WriteLine(curries[0].Equals(curries[2]));
Console.WriteLine(curries[0] == curries[1]);
Console.WriteLine(curries[0] == curries[2]);
}
}
|