Ne treba ti aktivator u ovoj situaciji, sve sto ti treba vec imas.
Emit se koristi za generisanje novih tipova, ne za instanciranje postojecih. Ako hoces da napravis instancu tipa koji je opisan sa instanceType koristis sledeci kod:
Code:
ConstructorInfo constr = instanceType.GetConstructor(Type.EmptyTypes);
object instance = constr.Invoke(null);
ovaj kod instancira objekat koristeci default konstruktor (onaj bez parametara), ako hoces da pozoves konstruktor sa odredjenim potpisom, pogledaj help za GetConstructor() i Invoke() metode.
▪ The word 'politics' is derived from the word 'poly', meaning 'many', and the word 'ticks', meaning 'blood sucking parasites' - Larry Hardiman
▪ If the good guy gets the girl, it's rated PG; if the bad guy gets the girl, it's rated R; and if everybody gets the girl, it's rated X
▪ Illegal aliens have always been a problem in the United States. Ask any Native American