public class TestClass
{
const MyType SOMECONSTANT = null;
protected string TestString { get; set; }
}
public class MyType
{
protected string FieldA { get; set; }
}
上記のコードは有効であり、コンパイルされます。なぜC#はで参照型constを許可するのnullですか?SOMECONSTANTこれは常に行われるので、どうすればこれを使用できnullますか?