示例#1
0
        static void Main(string[] args)
        {
            Digit dig = new Digit(7);
            // implicit conversion
            double num = dig;

            // implicit conversion
            Digit dig2 = 12;

            Console.WriteLine("num = {0}, dig2 = {1}", num, dig2.val);
            Console.ReadLine();
        }
示例#2
0
        static void Main(string[] args)
        {
            Digit dig = new Digit(7);
            // implicit conversion
            double num = dig;

            // implicit conversion
            Digit dig2 = 12;

            Console.WriteLine("num = {0}, dig2 = {1}", num, dig2.val);
            Console.ReadLine();
        }