Question

I have the below field declaration in one of my classes

private readonly string name = "some name";

How can I remove the 'readonly' in the assembly at run time using FieldDefinition or some other way?

Était-ce utile?

La solution

I was in hurry to get this answer and tried myself later. So found that below property will do it

IsInitOnly
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top