你的位置: 码友网首页 / 资讯源列表 / C# 8.0 nullable references: transcending the type system with AllowNull

关于[C# 8.0 nullable references: transcending the type system with AllowNull]的摘要:

In this post, I’m going to look at the AllowNull attribute. It lets you state that a null is allowed even when the type seems to state otherwise. Why might you do such a thing? If you want a nullable string reference, wouldn’t you just write string??

原文地址: https://blogs.endjin.com/2020/05/c-8-0-nullable-references-transcending-the-type-system-with-allownull/

收录时间: 2020-05-19 浏览量: 2144 分类: C#开发

| 0 收藏 | 0