lundi 30 mars 2020

Weird Types when retrieving all Types from Assembly

I use reflection to retrieve Types from within a namespace and do some stuff which each of them:

Type baseType = typeof(BaseUpdate);
            var updateTypes = baseType.Assembly.GetTypes(); 
foreach (var type in updateTypes) {
  if (type.Namespace!="myApp.Logic.Updates") continue;
  // stuff
}

This works fine. I retrieve all the types I want and can do stuff with them. But as an addition I also retrieve some "weird" types I do not really undestand where they come from. They all start with "<>" and seem to have the "IsNestedPrivate" - Flag set to true: enter image description here That flag helps me to differenciate those types but what are those and why are they there?





Aucun commentaire:

Enregistrer un commentaire