G
Guest
I'll big problem.
I have tree class:
public Class Column
{
public Column
{...}
string _Value;
public bool HasValue = false;
public string Value
{
set
{
_Value = value;
HasValue = true;
}
}
...
}
public Class Customer
{
public Customer
{...}
public Column Name;
public Column EMail;
....
}
public Class CustomerBL
{
public CustomerBL
{...}
public Cliente Parameters;
....
}
Normally I use thus:
CustomerBl oCustomer = new CustomerBL();
oCustomer.Parameters.Name.Value = "Steve Bug";
oCustomer.Parameters.EMail.Value = "(e-mail address removed)";
This form OK.
Now it is that they are they, as to set the Value property using Reflection?
object Customer;
//Load DLL
Assembly tempAssembly = Assembly.LoadFrom(DLL Path);
//Create Object Customer
Customer = tempAssembly.CreateInstance(Customer);
Type Tp = Customer.GetType();
Tp.GetField("Parameters").FieldType.GetField("Name").FieldType.GetProperty("Value").SetValue(Which object put here? , "Mike Ronald", null);
Are you know as to make this?
Tanks.
I have tree class:
public Class Column
{
public Column
{...}
string _Value;
public bool HasValue = false;
public string Value
{
set
{
_Value = value;
HasValue = true;
}
}
...
}
public Class Customer
{
public Customer
{...}
public Column Name;
public Column EMail;
....
}
public Class CustomerBL
{
public CustomerBL
{...}
public Cliente Parameters;
....
}
Normally I use thus:
CustomerBl oCustomer = new CustomerBL();
oCustomer.Parameters.Name.Value = "Steve Bug";
oCustomer.Parameters.EMail.Value = "(e-mail address removed)";
This form OK.
Now it is that they are they, as to set the Value property using Reflection?
object Customer;
//Load DLL
Assembly tempAssembly = Assembly.LoadFrom(DLL Path);
//Create Object Customer
Customer = tempAssembly.CreateInstance(Customer);
Type Tp = Customer.GetType();
Tp.GetField("Parameters").FieldType.GetField("Name").FieldType.GetProperty("Value").SetValue(Which object put here? , "Mike Ronald", null);
Are you know as to make this?
Tanks.