G
Guest
When creating a class using the Invoke method of the ConstructorInfo, this
returns and object. I am wondering how I can reclass this object type into
the specific class type. Since I only have the "text" name of the class to
begin with, how can I make an object reclassed into an object of the class
which is of the text name that I have.
Type[] parms = { typeof(System.Data.OleDb.OleDbDataReader) };
Type theTblType = Type.GetType("MyClassName");
ConstructorInfo methodCreate = theTblType.GetConstructor(parms);
object[] argumentItems = { dr };
object rec = methodCreate.Invoke(theTblType, argumentItems);
How do I reclass "rec" into a type of "MyClassName" with only the text
name of
the class?
Thanks in advance for your assistance!!!
returns and object. I am wondering how I can reclass this object type into
the specific class type. Since I only have the "text" name of the class to
begin with, how can I make an object reclassed into an object of the class
which is of the text name that I have.
Type[] parms = { typeof(System.Data.OleDb.OleDbDataReader) };
Type theTblType = Type.GetType("MyClassName");
ConstructorInfo methodCreate = theTblType.GetConstructor(parms);
object[] argumentItems = { dr };
object rec = methodCreate.Invoke(theTblType, argumentItems);
How do I reclass "rec" into a type of "MyClassName" with only the text
name of
the class?
Thanks in advance for your assistance!!!