Can you set an Integer to be null in C# 开发者_JAVA技巧2.0?
I am assuming you are using c# 2.0 & .net framework 2.0 onwards.
Use nullable types for that.
e.g. int? myValue = null
;
or
Nullable<int> myOtherValue = null;
EDIT: See an example here.
Can you set an Integer to be null in C# 开发者_JAVA技巧2.0?
I am assuming you are using c# 2.0 & .net framework 2.0 onwards.
Use nullable types for that.
e.g. int? myValue = null
;
or
Nullable<int> myOtherValue = null;
EDIT: See an example here.
上一篇:端门和午门的区别?
摩尔庄园手游怎么去小镇??:下一篇
精彩评论