If I get the list of types in my AppDomain, is there an inherent ordering to these types?
List<Type> myTypes = new List<Type>();
foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies())
myTypes.AddRange(a.GetTypes());
This seems to produce a list that's grouped by types in a namespace, but I can't see a pattern to the namespace groups themselves (or the types within each namespace group).
Even if you can discern an order, there's nothing in the documentation to guarantee it - so you absolutely should not rely on it.
If you want a particular ordering, you should ensure it yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With