MS.NET does ignore the Final attribute for fields, so we
have to ignore it to be compatible. Also, CodeMemberField
objects are created with the Final flag set, so with this
change all fields were now generated as readonly, which
is a severe regression.
protected override void OutputFieldScopeModifier (MemberAttributes attributes)
{
switch (attributes & MemberAttributes.ScopeMask) {
- case MemberAttributes.Final:
- Output.Write ("readonly ");
- break;
case MemberAttributes.Static:
Output.Write ("static ");
break;