I've got an ITypeSymbol
for a nested type (MyNamespace.MyOuter.Nested
) and am trying to get the type's full name using:
typeSymbol.ToDisplayString(new SymbolDisplayFormat(
SymbolDisplayGlobalNamespaceStyle.Omitted,
SymbolDisplayTypeQualificationStyle.NameAndContainingTypesAndNamespaces,
SymbolDisplayGenericsOptions.IncludeTypeParameters,
miscellaneousOptions: SymbolDisplayMiscellaneousOptions.ExpandNullable
));
Reflection returns the full name as MyNamespace.MyOuter+Nested
- how to obtain the very same string from Roslyn? The display format above returns MyNamespace.MyOuter.Nested
:-(