Ejemplo n.º 1
0
        public void TypeAssertUnit()
        {
            string classObj = "";
            bool   test1    = classObj.IsClass();
            bool   test2    = classObj.IsValue();
            bool   test3    = classObj.IsStruct();
            bool   test4    = classObj.IsEnum();

            int valueObj = 0;

            test1 = valueObj.IsClass();
            test2 = valueObj.IsValue();
            test3 = valueObj.IsStruct();
            test4 = valueObj.IsEnum();

            TestEnum enumObj = TestEnum.None;

            test1 = enumObj.IsClass();
            test2 = enumObj.IsValue();
            test3 = enumObj.IsStruct();
            test4 = enumObj.IsEnum();

            TestStruct structObj = new TestStruct();

            test1 = structObj.IsClass();
            test2 = structObj.IsValue();
            test3 = structObj.IsStruct();
            test4 = structObj.IsEnum();
        }