Ich benutze das .NET CF 3.5. Der Typ, den ich erstellen möchte, hat keinen Standardkonstruktor, deshalb möchte ich eine Zeichenfolge an einen überladenen Konstruktor übergeben. Wie mache ich das?Compact Framework - Wie erstelle ich dynamisch einen Typ ohne Standardkonstruktor?
Code:
Assembly a = Assembly.LoadFrom("my.dll");
Type t = a.GetType("type info here");
// All ok so far, assembly loads and I can get my type
string s = "Pass me to the constructor of Type t";
MyObj o = Activator.CreateInstance(t); // throws MissMethodException