abstract class DirectiveNode
{
public static readonly RequirementOptions ArgumentOptions = RequirementOptions.Optional;
}
class IfNode : DirectiveNode
{
static IfNode()
{
ArgumentOptions = RequirementOptions.Required; // error here
}
I don't understand the problem. I thought static IfNode()
was a static constructor? Why the error?
Just found this: Assigning to static readonly field of base class