I have a generic class ValueCriterion
that take another class type as parameter. Following code works fine.
new ValueCriterion<,CrashDetected>(0));
Where CrashDetected
is a class.
But when I get the type of the CrashDetected
class using the following code.
Type myType = Type.GetType("NetworkDB." + "CrashDetected");
and pass myType
to ValueCriterion
, the compiler gives me the following error:
new ValueCriterion<,myType>(0));
Error 1 Using the generic type requires 1 type arguments.
I will highly appreciate any help.