G
Guest
I'd like to create a method that will instantiate an object of whatever type
is specified as the argument. Is this possible?
This C# code does not work but it shows what I'm trying accomplish. Thanks.
private void NewObject(Type x)
{
x newObject = new x();
}
is specified as the argument. Is this possible?
This C# code does not work but it shows what I'm trying accomplish. Thanks.
private void NewObject(Type x)
{
x newObject = new x();
}