How to Override a private set property
- by David
Hi,
Im using the Microsoft.Office.Interop.MSProject.Resource assembly which
has a "UniqueID" property, it has a get but not set.
How can I actually set a value?
An example would be very much appreciated.
--Update--
Ok I can get the value for a property "Name" and set, but Im intersted in the "UniqueId" property that does not have a public set (get only):
int ii = (int)resource.GetType().InvokeMember("UniqueID", BindingFlags.GetProperty, null, resource, new object[] { });
resource.GetType().InvokeMember("UniqueID", BindingFlags.SetProperty, null, resource, new object[] {iUid,});
I get the following error
{"Number of parameters specified does not match the expected number."}
anyway for me to work out how many paramters it needs?