1

Here my simplified code:

var responseObj = new
{
    memo = ""
};
responseObj.memo = "Test";

As you can see, I tried to modify responseObj.memo, but the result:

enter image description here

Is there any other way for it?

Yusril Maulidan Raji
  • 1,682
  • 1
  • 21
  • 46

1 Answers1

1

Anonymous type based classes are read only. You will have to create your own class in order to write back to the member.

class MyClass
{
    public string Memo { get; set; }
}
Maritim
  • 2,111
  • 4
  • 29
  • 59