using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 암시적으로형식화된로컬변수
{
    class Program
    {
        static void Main(string[] args)
        {
            // 변수 선언
            int a = 10;
           
            // Nullable 형식
            int? b = null; //
           
            // 암시적으로 형식화된 로컬 변수
            var i = 1234; // 알아서 초기화되는 값으로 선언
            var s = "1234";

            // 타입 출력
            Console.WriteLine("{0}", i.GetType()); // Int32
            Console.WriteLine("{0}", s.GetType()); // String
           
        }
    }
}

Posted by holland14
: