It is a little long, but the typeof(Dictionary<string, Dictionary<Guid, DateTime>>).FullName
is:
System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Collections.Generic.Dictionary`2[[System.Guid, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]
The typeof()
operator returns a RuntimeType
, that is a .NET class. So the FullName
is a property of a type of .NET, so it's official :-)
If you try to do a Type.GetType(thatstring)
, you obtain the correct type :-)
A more compact version, without assembly shortnames, can be obtained with: typeof(Dictionary<string, Dictionary<Guid, DateTime>>).ToString()
. This too can be used with Type.GetType(...)
System.Collections.Generic.Dictionary`2[System.String,System.Collections.Generic.Dictionary`2[System.Guid,System.DateTime]]
Note that there is a limitation in Type.GetType
with this format:
The assembly-qualified name of the type to get. See AssemblyQualifiedName. If the type is in the currently executing assembly or in Mscorlib.dll, it is sufficient to supply the type name qualified by its namespace.
If you are interested, here there is the full format: AssemblyQualifiedName