CSharp - What is the output: sealed field

Question

What is the output from the following code

class A
{
    sealed int a = 5;
}


Click to view the answer

compile time error

Note

In C#, you cannot use sealed for fields.

In this case, you could use readonly.

Related Quiz