Пример #1
0
        public static void Structs_and_Classes()
        {
            // 类继承自用户选择的另一个类 并且都继承自System.Object
            object classObj = new Class1();

            // 结构继承自System.ValueType 并且System.ValueType继承自System.Object
            ValueType structValue = new Struct1();
            object    structObj   = structValue;
        }
Пример #2
0
        public static void Structs_and_Classes()
        {
            // 类继承自用户选择的另一个类 并且都继承自System.Object
            object classObj = new Class1();

            // 结构继承自System.ValueType 并且System.ValueType继承自System.Object
            ValueType structValue = new Struct1();
            object structObj = structValue;
        }