示例#1
0
 static void Main(string[] args)
 {
     A.MyClass objA = new A.MyClass();
     B.MyClass objB = new B.MyClass();
     Console.WriteLine(objA.ToString());
     Console.WriteLine(objB.ToString());
 }
示例#2
0
        static void Main(string[] args)
        {
            A.MyClass objA = new A.MyClass();
            B.MyClass objB = new B.MyClass();


            Console.WriteLine(objA.ToString());
            Console.WriteLine(objB.ToString());

            //System.Int32 num = 3;

            int    i   = 1234;
            object box = i;

            Console.WriteLine(box);
            int j = (int)box;

            Console.WriteLine(j);

            double d    = 3.14;
            object box1 = d;

            Console.WriteLine(box1);
            int d1 = (int)box1;

            Console.WriteLine(d1);
        }
示例#3
0
 static void Main(string[] args)         // call from Main
 {
     A.MyClass objA = new A.MyClass();   // alloc class A
     B.MyClass objB = new B.MyClass();   // alloc class B
     Console.WriteLine(objA.ToString()); // print in console
     Console.WriteLine(objB.ToString()); // print in console
 }