PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, November 21, 2022

[FIXED] What is compiler warning CS1723 "XML comment has cref attribute 'T' that refers to a type parameter" all about?

 November 21, 2022     c#, code-documentation, compiler-warnings, visual-studio, visual-studio-2017     No comments   

Issue

Given this code:

/// <summary>
/// Implementations represent a configuration with a specific data 
/// type <see cref="T"/> that can be used by this application.
/// </summary>
internal interface IConfiguration<T>
{
}

I'm getting a compiler warning CS1723 on T inside the see cref XML element:

XML comment has cref attribute 'T' that refers to a type parameter

MS Docs is completely useless in this case. Why should I care about this warning? What is the reason for it?


Solution

To reference a type parameter, use <typeparamref name="T" />.

/// <summary>
/// Implementations represent a configuration with a specific data 
/// type <typeparamref name="T" /> that can be used by this application.
/// </summary>
internal interface IConfiguration<T>
{
}


Answered By - Matt Johnson-Pint
Answer Checked By - Timothy Miller (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing