2
How can I inherit the comments within the tag <summary>
of an object?
I have the following class:
class BASE
{
/// <summary>
/// String de Conexão a base de dados.
/// </summary>
public virtual string CONN { get; set; }
/// <summary>
/// Carregar DataTable do Modelo.
/// </summary>
/// <param name="Select">Select do Modelo.</param>
/// <returns></returns>
public virtual DataTable LOAD(string Select) => new DataTable();
}
When I create new classes from it, they don’t inherit the comments through the override
Ex:
class SQL : BASE
{
public override string CONN { get => base.CONN; set => base.CONN = value; }
public override DataTable LOAD(string Select)
{
return base.LOAD(Select);
}
}
And if you still want to put some note, you can use the tag
<see>
pointing to the reference. https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/see– Leandro Angelo
Very good, did not know this tag. + 1
– Gabriel Coletta