C# Language XML Documentation Comments Simple method annotation

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

Documentation comments are placed directly above the method or class they describe. They begin with three forward slashes ///, and allow meta information to be stored via XML.

/// <summary>
/// Bar method description
/// </summary>
public void Bar()
{ 
        
}

Information inside the tags can be used by Visual Studio and other tools to provide services such as IntelliSense:

Method xml annotation example

See also Microsoft's list of common documentation tags.



Got any C# Language Question?