سؤال

I have a library for which I have to create the XML documentation. Therefore, for all public methods and properties I inserted XML comments. Unfortunately, for some comments I have to insert the special character < or > to describe the return type (a List). The compiler continues to issue a warning for invalid character and indicates the character <.
How do I persuade the compiler to accept this character without warnings?

هل كانت مفيدة؟

المحلول

How do I persuade the compiler to accept this character without warnings?

You don't. You have to use the equivalent XML entity (&lt;)

Note that if you use the <see cref="..." /> element, you can specify the type like this:

<see cref="List{T}"/>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top