C# creating a non-nullable string. Is it possible? Somehow?

后端 未结 8 961
感情败类
感情败类 2021-01-11 10:05

So you can\'t inherit string. You can\'t make a non-nullable string. But I want to do this. I want a class, let\'s call it nString that returns a d

8条回答
  •  Happy的楠姐
    2021-01-11 10:18

    With the release of C# 8 in April 2019 and nullable reference types this is now a language feature.

提交回复
热议问题