C#

Comments in C#

Suggested Videos
Part 6 – Nullable Types
Part 7 – Datatype Conversions
Part 8 – Arrays

In this video, we will discuss
1. Single line comments
2. Multi line comments
3. Introduction to XML documentation comments

Single line Comments                       –   //
Multi line Comments                    –   /*  */
XML Documentation Comments      –   ///

Comments are used to document what the program does and what specific blocks or lines of code do. C# compiler ignores comments.

To Comment and Uncomment, there are 2 ways
1. Use the designer
2. Keyboard Shortcut: Ctrl+K, Ctrl+C and Ctrl+K, Ctrl+U

Note: Don’t try to comment every line of code. Use comments only for blocks or lines of code that are difficult to understand

[youtube https://www.youtube.com/watch?v=PRgAAokHBNw]
KhalidAhmed
Khalid Ahmed

Expert .NET Full-Stack Developer with 10+ years building scalable business applications. Proficient in C#, ASP.NET Core, Angular, SQL, and Azure Cloud. Strong background in SDLC, APIs, microservices, and DevOps. Delivers high-performance solutions aligned with business needs. Let’s innovate together!

Khalid Ahmed

Expert .NET Full-Stack Developer with 10+ years building scalable business applications. Proficient in C#, ASP.NET Core, Angular, SQL, and Azure Cloud. Strong background in SDLC, APIs, microservices, and DevOps. Delivers high-performance solutions aligned with business needs. Let’s innovate together!

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also
Close
Back to top button