Exemple #1
0
        static void Main(string[] args)
        {
            Wanted <string> WantedString = new Wanted <string>("루피");
            Wanted <int>    wantedInt    = new Wanted <int>(100);
            Wanted <double> wanteddouble = new Wanted <double>(3.141592);

            Console.WriteLine(WantedString.value);
            Console.WriteLine(wantedInt.value);
            Console.WriteLine(wanteddouble.value);
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Wanted <string> wantedString = new Wanted <string>("Gretting");
            Wanted <int>    wantedInt    = new Wanted <int>(100);
            Wanted <double> wantedDouble = new Wanted <double>(3.141596);

            Console.WriteLine("문자열: " + wantedString.Value);
            Console.WriteLine("정수: " + wantedInt.Value);
            Console.WriteLine("실수: " + wantedDouble.Value);
        }
Exemple #3
0
        static void Main(string[] args)
        {
            //실행시점에 타입이 바뀐다.  컴파일 시점은 타입이 굳어져버린다.
            Wanted <string> wantedString = new Wanted <string>("String");
            Wanted <int>    wantedInt    = new Wanted <int>(920116);
            Wanted <double> wantedDouble = new Wanted <double>(52.273);


            Console.WriteLine(wantedString.value);
            Console.WriteLine(wantedInt.value);
            Console.WriteLine(wantedDouble.value);
        }