简写语法是语言规范的一部分吗?
我们是否可以为通用接口创建自己的速记语法?
解决方法 是的,?是规范的一部分.您无法创建自己的快捷方式.总结4.1.10 Nullable types
A nullable type can represent all values of its underlying type plus
an additionalnull
value. A nullable type is writtenT?
,whereT
is
the underlying type. This Syntax is shorthand forSystem.Nullable<T>
,and the two forms can be used interchangeably.
以上是内存溢出为你收集整理的C#中通用接口的简写语法全部内容,希望文章能够帮你解决C#中通用接口的简写语法所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)