M
MKoleoso
Problem: C#- Unable to create instance of a class
implementing from an interface
I have:
namespace someNamespace
{
public __gc class SomeClass1
{
}
public __gc class SomeClass2: public ISomeInterface
{
}
}
I'm trying to create instances of them both using
Assembly.CreateInstance("..."),
but SomeClass2 fails because it is flagged as an abstract
class. I get the exception:
Cannot create an abstract class.
What do I need to be able to create instances of classes
implementing interfaces?
Regards,
Mike
implementing from an interface
I have:
namespace someNamespace
{
public __gc class SomeClass1
{
}
public __gc class SomeClass2: public ISomeInterface
{
}
}
I'm trying to create instances of them both using
Assembly.CreateInstance("..."),
but SomeClass2 fails because it is flagged as an abstract
class. I get the exception:
Cannot create an abstract class.
What do I need to be able to create instances of classes
implementing interfaces?
Regards,
Mike