(2010-08-02) C#.NET NullAble

摘要:(200-08-02) C#.NET NullAble

程式碼

 

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

namespace mod01
{
    class TestNullAble
    {
        public static void Main()
        {
            //未知
            Nullable<DateTime> myDateTime; //作法1
            //DateTime? myDateTime;        //作法2
            myDateTime = DateTime.Now;
            System.Console.WriteLine(myDateTime);
        }
    }
}