Define a Property(get set) for the private member c.
Then you can set the property using reflection. Let Property Name is "PropForMyC"
private int c;
Public int PropForMyC
{
get {return c;}
set {c = value;}
}
Suppose you have your Target.exe has an object(class) that has the above mentioned Property. Let this object be obj
Now you can use like this :
PropertyInfo prop = obj.GetType().GetProperty("PropForMyC", BindingFlags.Public | BindingFlags.Instance);
if(null != prop && prop.CanWrite)
{
prop.SetValue(obj, 5, null);
}
Thanks,
Kuthuparakkal