문제

I tried using TypeDescriptor and the value is not changing, and via reflection I get an error that there is no setter for that property

도움이 되었습니까?

해결책

C# anonymous types are immutable, and their properties cannot be changed.

If you really want to, you could set the backing field using reflection, but it would be a bad idea.

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