C# 可空值类型

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

namespace 可空值类型
{
    class Program
    {
        static void Main(string[] args)
        {
            int? a = null;
            int? b = 5;
            Console.WriteLine(a);//
            Console.WriteLine(b);//5
            Console.WriteLine(a == b);//false
            Console.ReadKey();            
        }

    }


}

 

posted on 2017-08-30 10:22  苹果园dog  阅读(260)  评论(0编辑  收藏  举报

导航