Getting the fully qualified name of a type from a TypeInfo object
问题 Is it somehow possible to get the fully qualified name of the type contained in a TypeInfo object? In the debugger many of these values nicely show up as System.Int32 but when it's printed out, not one of them contains this fully qualified name. I need this to provide as an argument to Type.GetType() . var typeInfo = semanticModel.GetTypeInfo(argument); var w = typeInfo.ToString(); // Microsoft.CodeAnalysis.TypeInfo var y = typeInfo.Type.ToString(); // int var z = typeInfo.Type