Skip to content

Instantly share code, notes, and snippets.

@skalahonza
Created August 17, 2023 09:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skalahonza/57c9a2d3a4b057faa63eae420c73b9be to your computer and use it in GitHub Desktop.
Save skalahonza/57c9a2d3a4b057faa63eae420c73b9be to your computer and use it in GitHub Desktop.
Reusing XML Documentation in C#
var dto = new DTO();
var tmp = dto.Description; // see the same summary as in Entity.Description
public class Entity
{
/// <summary>
/// The description of the entity.
/// </summary>
public string Description { get; set; }
}
public class DTO
{
/// <inheritdoc cref="Entity.Description"/>
public string Description { get; set; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment