摘要:
示例代码:public class Shop : Lintop.eWorld.Facade.FacadeBase { private Tfs_System _DaShop; protected Tfs_System DaShop { get { if (_DaShop == null) { _DaShop = new Tfs_System(); _DaShop.ReferenceTransacti...
阅读全文
posted @ 2008-12-27 22:13
Ss_Andy
阅读(760)
推荐(0)
编辑
摘要:
废话不多说,直接看代码,应该很容易懂,:)int number = null; //报错int? number = null; //编译正常,?代表可空类型,对所有值类型都可以使用int? op = 5;int result = op * 2; //报错,因为op可能是null,不能用null * 值类型应改为:int? op = 5;int result = (int)op * 2;或者int ...
阅读全文
posted @ 2008-12-27 21:37
Ss_Andy
阅读(378)
推荐(1)
编辑