vendredi 10 avril 2015

Are DLLs loaded by reflection being cached?

I have an application that loads Type by reflection upon need since implementation may be changed by configuration. here is a sample code:



var myObject = Activator.CreateInstance(Type.GetType("MyAssembly.MyClass, MyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1r46a5dfa04dase2"))as IMyClass


My Question here, is this Type being cached by default or it will be reloaded every time, and if not, How can I cache it to enhance performance?






Aucun commentaire:

Enregistrer un commentaire