Compiler Warning (level 2) CS1710
XML comment on 'type' has a duplicate typeparam tag for 'parameter'
The documentation of a generic type includes a duplicate tag for the type parameter.
The following code will cause warning CS1710 to appear.
// CS1710.cs
// compile with: /doc:cs1710.xml
// To resolve this warning, delete one of the duplicate <typeparam>'s.
using System;
class Stack<ItemType>
{
}
/// <typeparam name="MyType">can be an int</typeparam>
/// <typeparam name="MyType">can be an int</typeparam>
class MyStackWrapper<MyType>
{
// Open constructed type Stack<MyType>.
Stack<MyType> stack;
public MyStackWrapper(Stack<MyType> s)
{
stack = s;
}
}
class CMain
{
public static void Main()
{
// Closed constructed type Stack<int>.
Stack<int> stackInt = new Stack<int>();
MyStackWrapper<int> MyStackWrapperInt =
new MyStackWrapper<int>(stackInt);
}
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: