[Solved] How to prevent optimization on a class field in C#


I have a local copy here with Parse written as the rather opaque:

public void Parse(string[] args)
{    // deliberately opaque, not that it would make any difference
    string fieldName = (new string('S', 1) + "ilentX").Substring(0, 6);
    GetType().GetField(fieldName).SetValue(this, true);
}

It works fine. I do not believe the problem is what you think it is.

3

solved How to prevent optimization on a class field in C#