Comments in C#

You can easily add comments within the structure of your C#. Comments are used to help document what a program does and what the code with it does. Keep the comments simple and direct . It is used for formal documentation for understanding particular code and its operation. There are three ways of commenting in C#.

  1. Single Line Comment
  2. MultiLine Comment
  3. XML documentation comment

Single Line Comment

The single line comment is specified using the symbol //


MultiLine Comment

The Multiline comment can be specified using the symbol /* */


XML documentation comment

This is a special kind of comment which is generally used for API documentation. The XML

documentation comment can be specified using the symbol ///


Note - we can use Ctrl+K, Ctrl+C and Ctrl+K, Ctrl+U to Comment or Uncomment selected lines in C#.

What is Microsoft .Net Framework

The Microsoft .Net Framework is a platform that provides tools and technologies you need to build Networked Applications as well as Distributed Web Services and Web Applications. The .Net Framework provides the necessary compile time and run-time foundation to build and run any language that conforms to the Common Language Specification (CLS). More on... .Net Framework
 (C) 2022    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.
SiteMap  | Terms  | About