摘要: 一些简单的测试代码: static int? GetNullableInt() { return null; } static string GetStringValue() { return null; } static void Main() { int? x = null; int y = x ?? -1; Console.WriteLine("y={0}", y);//y=-1 int i = GetNullableInt() ?? default(int); Cons... 阅读全文
posted @ 2012-03-30 09:27 wouldguan 阅读(170) 评论(0) 推荐(0) 编辑