Q:

C# How to create setter in runtime?

Is there any way to add a setter in Property object such like
public class MyClass
{
    public int Test { get; }
}

And I want to do it later in runtime using Reflection or something like this.

A:

Short version: no.
You cannot monkey-patch types in .NET, so no, you cannot do this. If the existing set mechanism is protected, the closest you could do would be to subclass and use member-hiding to re-declare the property with a public set. However, that will only be available to code that references the subclass - so: not much point.

