Hi people!

Yes, Fernando, sometimes, you need to load the assembly if it's not loaded
yet, as in your code. I usually call .GetReferencedAssemblies() on each
loaded assembly, then I load manually each one that it's not loaded (I don't
know to check how an assembly is loaded or not, then I consult the complete
list of loaded assembly from AppDomain.CurrentDomain.GetAssemblies).

Angel "Java" Lopez
http://www.ajlopez.com/


The preceding code works but I wonder if there is a more direct route. For
instance, is enumerating the loaded assemblies and calling GetType on each
an appropiate mechanism to search for the enum's type? Also, I suppose the
code would fail if the enum is defined in a referenced assembly which
hasn't
been loaded yet. Are there any alternatives? Does parsing the name of the
enum's type and the constant's name by splitting the string at the last
'.'
character cover every possible case?

Fernando Tubio


===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to