How to use .NET reflection to check for nullable reference type

后端 未结 2 1090
臣服心动
臣服心动 2020-11-28 10:23

C# 8.0 introduces nullable reference types. Here\'s a simple class with a nullable property:

public class Foo
{
    pu         


        
2条回答
  •  失恋的感觉
    2020-11-28 11:05

    I wrote a library to do reflection of NRT types - internally it looks at the generated attributes and gives you a simple API:

    https://github.com/RicoSuter/Namotion.Reflection

提交回复
热议问题