68.int、DateTime、string是否可以为 null?
a.int、DateTime 不能
b.因为其为 Struct 类型,而结构属于值类型,值类型不能为 null,只有引用类型才能被赋值 null。 string 可以为 null
string str= null与 string str=““说明其中的区别?
最新推荐文章于 2024-03-12 10:12:38 发布
68.int、DateTime、string是否可以为 null?
a.int、DateTime 不能
b.因为其为 Struct 类型,而结构属于值类型,值类型不能为 null,只有引用类型才能被赋值 null。 string 可以为 null