码迷,mamicode.com
首页 > Windows程序 > 详细

C# 可空值类型

时间:2017-08-30 11:07:53      阅读:257      评论:0      收藏:0      [点我收藏+]

标签:sys   ace   str   key   []   style   值类型   ram   span   

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();            
        }

    }


}

 技术分享

C# 可空值类型

标签:sys   ace   str   key   []   style   值类型   ram   span   

原文地址:http://www.cnblogs.com/dog2016/p/7451799.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!