N
Nicky
Hello,
I have to explain my problem with an example :
public class DecisionTables
{
public ObjectName ObjectName; // ObjectName defined in
other .cs
public DecisionTables()
{
functX();
}
public functX()
{
// Here I read from a database a name of an object and
put it in a string (normally in a loop)
string whichobject = "ObjectName";
// Create Instance of whichobject
Type collectieType = Type.GetType(whichobject );
Object objCollectie = System.Activator.CreateInstance
(collectieType);
// My problem : I will dynamically set the reference
of this new object to this.ObjectName.
// Not dynamically I do the following
this.ObjectName = (ObjectName)objCollectie;
// I don't want this, I think first I have to search for
a member in DecisionTables of the type ObjectName and then
I will give it a reference. But also the parsing must by
dynamically (I have to do the parsing).
}
Thanks,
Nicky
I have to explain my problem with an example :
public class DecisionTables
{
public ObjectName ObjectName; // ObjectName defined in
other .cs
public DecisionTables()
{
functX();
}
public functX()
{
// Here I read from a database a name of an object and
put it in a string (normally in a loop)
string whichobject = "ObjectName";
// Create Instance of whichobject
Type collectieType = Type.GetType(whichobject );
Object objCollectie = System.Activator.CreateInstance
(collectieType);
// My problem : I will dynamically set the reference
of this new object to this.ObjectName.
// Not dynamically I do the following
this.ObjectName = (ObjectName)objCollectie;
// I don't want this, I think first I have to search for
a member in DecisionTables of the type ObjectName and then
I will give it a reference. But also the parsing must by
dynamically (I have to do the parsing).
}
Thanks,
Nicky