开发者

Can you set an Integer to be null in C# 2.0?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜