문제

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?

도움이 되었습니까?

해결책

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

IsInitOnly
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top