How can implement this getter and setter? will it work with the methods instead of properties? or is it impossible to?
SomeClass someObject = new SomeClass();
int x = someObject.GetProperty("X");
someObject.SetProperty("Y","Value");
someObject.Call("DoSomething");
class SomeClass
{
public int X{ get; set; }
public string Y{ get ;set; }
public void DoSomething() { return; }
}
you would need to use Reflection for this sort of thing – for example: