Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("***Comparison between user-defined and  C# provided default constructors***\n");
            DefConsDemo ObDef = new DefConsDemo();

            Console.WriteLine("myInt={0}", ObDef.myInt);
            Console.WriteLine("myFloat={0}", ObDef.myFloat.ToString("0.0####"));
            Console.WriteLine("myDouble={0}", ObDef.myDouble);
            Console.Read();
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            Console.WriteLine("*** ユーザ定義とC#既定のコンストラクタの比較 ***\n");
            DefConsDemo ObDef = new DefConsDemo();

            Console.WriteLine("myInt={0}", ObDef.myInt);
            Console.WriteLine("myFloat={0}", ObDef.myFloat);
            Console.WriteLine("myDouble={0}", ObDef.myDouble);
            Console.Read();
        }