示例#1
0
    public static void showStruct()
    {
        StructA a = new StructA();
        StructB b = new StructB();
        StructC c = new StructC();

        Console.WriteLine(a);
        Console.WriteLine(b);
        Console.WriteLine(c);
        Console.WriteLine(a.GetType());
        Console.WriteLine(b.GetType());
        Console.WriteLine(c.GetType());
        // Console.WriteLine(a == b); // Can't comparable
        // Console.WriteLine(a == c); // Can't comparabl;
        // Console.WriteLine(b == c); // Can't comparabl;
    }
示例#2
0
文件: Type.cs 项目: hythof/csharp
 public static void showStruct()
 {
     StructA a = new StructA();
     StructB b = new StructB();
     StructC c = new StructC();
     Console.WriteLine(a);
     Console.WriteLine(b);
     Console.WriteLine(c);
     Console.WriteLine(a.GetType());
     Console.WriteLine(b.GetType());
     Console.WriteLine(c.GetType());
     // Console.WriteLine(a == b); // Can't comparable
     // Console.WriteLine(a == c); // Can't comparabl;
     // Console.WriteLine(b == c); // Can't comparabl;
 }