If it's harder to explain using words, let's look at an example
I have a generic function like this
void FunctionA<T>() where T : Form, new()
{
}
If I have a reflected type, how do I use it with the above function? I'm looking forward to do this
Type a = Type.GetType("System.Windows.Forms.Form");
FunctionA<a>();
Of cause the above method doesn't work.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…