G
Guest
In the example below i create a new object which is of SqlParameter type.
SqlParameter sqlParameter = new SqlParameter();
object newObject = Activator.CreateInstance(sqlParameter.GetType(), false);
How can I do the same thing but from a string defining the type ie. the type
i need to create my new object in is displayed as a string... is there code
that could do this...
sting targetObject = "System.Data.SqlClient.SqlParameter"
object newObject = Activator.CreateInstance(targetObject.GetType(), false);
many thanks CR
SqlParameter sqlParameter = new SqlParameter();
object newObject = Activator.CreateInstance(sqlParameter.GetType(), false);
How can I do the same thing but from a string defining the type ie. the type
i need to create my new object in is displayed as a string... is there code
that could do this...
sting targetObject = "System.Data.SqlClient.SqlParameter"
object newObject = Activator.CreateInstance(targetObject.GetType(), false);
many thanks CR