有人请告诉我以下使用sealed不编译的原因吗?然而,如果我更换sealed与final和编译如Java,它的工作原理.
private sealed int compInt = 100;
public bool check(int someInt)
{
if (someInt > compInt)
{
return true;
}
return false;
}
Run Code Online (Sandbox Code Playgroud)