CLR Types

time to read 2 min | 393 words

Argh! Can someone explain to me why there is such a sharp distinction between types and nested types? I get it that nested types can be private, and normal types can't, but why is just about everything in System.Type qualified for nested and non nested types?

This rant brought to you by this code:

bool isNestedAndInternal = target.IsNested && (target.IsNestedAssembly || target.IsNestedFamORAssem);

bool isInternalNotNested = target.IsVisible ==false && target.IsNested==false;

bool internalAndVisibleToDynProxy = (isInternalNotNested || isNestedAndInternal) &&