“typeof 运算符不能用于可为空的引用类型”

Пав*_*вле 5 .net-core nullable-reference-types .net-core-3.1

当我尝试使用属性参数时,我刚刚收到此typeof(string?)错误SwaggerResponse

The typeof operator cannot be used on a nullable reference type在编译器里的

The typeof expression cannot be used on nullable reference types《骑士》中。

为什么我不能这样做?当我需要在编译时强调类型可为空时(如所描述的问题),我该怎么办?