A
Ade
Whereas typeof gets a Type from a class, I need to get a class from a
Type so that I may create the type at runtime.
Imagine if you wil
class foo
{
public foo bar()
{
foo newFoo = new GetType();
// Some magic goes here
return newFoo;
}
}
What would be the syntactically-correct way to do this? I want to
create, from the base class, a new instance of whatever type the
instance of foo is. eg calling bar() on
class superfoo : foo
will give me something unboxable to a superfoo.
Type so that I may create the type at runtime.
Imagine if you wil
class foo
{
public foo bar()
{
foo newFoo = new GetType();
// Some magic goes here
return newFoo;
}
}
What would be the syntactically-correct way to do this? I want to
create, from the base class, a new instance of whatever type the
instance of foo is. eg calling bar() on
class superfoo : foo
will give me something unboxable to a superfoo.