摘要:[筆記]int? ....??
客戶提供的Web References 用了int? datetime?
做下列筆記
int? 的差別於 int
是多一個? 可以允許 NULL
但是用法有差別 下列是一些筆記
int? count = Temp == null ? (int?)null : Convert.ToInt32(Temp );
int a = 0;
if (count.HasValue == true)
{
a = count .Value;
}
使用可為 Null 的型別 (C# 程式設計手冊)
http://msdn.microsoft.com/zh-tw/library/2cf62fcy(VS.80).aspx