문제

How is it possible to get the name of the type which corresponds to the name used in XML documentation output file?

I thought that XML documentation uses full names, but this is not the case. For example the full name of Collection<long> is:

System.Collections.Generic.ICollection`1[[System.Int64, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]])

while the XML documentation corresponding to a property of type Collection<long> is:

System.Collections.Generic.ICollection{System.Int64}

도움이 되었습니까?

해결책

XML documentation uses the fully qualified class name; e.g. the namespace and the class name. See http://msdn.microsoft.com/en-us/library/system.type.fullname.aspx

Your example (with PublicKey) is the fully qualified AssemblyName of the class; which is normally used only when you need to dynamically load the Type.

The XML documentation convention for a generic is to use '{T}' to make it easier to type, as in . "Collection" is not used because '<' is special in XML!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top