Navigation

Related Articles

Back to Latest Articles

C# Basics – Comments – Part 3

Let's take a look how comments in C# programming language work.


Andraz Krzisnik
C# Basics – Comments – Part 3

How To Write Comments in C# Programming Language

Writing comments into your code has proven to be very useful while investigating and identifying what each part of the code does. Compiler ignores comments when compiling the code. We can write comments in two different ways, as a single line or as multiple lines together.

//This is a comment

/*This is also a comment
This is also a comment
This is also a comment
This is also a comment*/

Comments also help us find errors, and understand how code works.

Download Project Next Chapter
Show Comments (0)

Comments

Related Articles

C# Basics

C# Basics – Random Numbers, Chars and Strings – Part 7

Random Numbers To generate a random number, we will use a constructor called Random. Then to generate a random number we will use either .Next() or .NextDouble() function. Random...

Posted on by Andraz Krzisnik
C# Tutorial

C# Tutorial: How To Convert a Color Image To Grayscale

Grayscale images are basically black and white images. These images are good for programming, since their pixels hold only intensity values or in other words, shades of gray, they...

Posted on by Andraz Krzisnik