DEV Community

Kerimova_Manzura
Kerimova_Manzura

Posted on

write comments in C#.

Hi all!
Let's talk today about how you can comment in C#.
First, we are writing some code and we need to comment it, what should we do?
We will use the signs “//” and write a comment.

  • For example:
// This is a one-line comment.
Console.WriteLine("Hello World!");
Enter fullscreen mode Exit fullscreen mode

so we can comment the code.

  • there is another way.
/* This is a multi-line comment */
Console.WriteLine("Hello World!");
Enter fullscreen mode Exit fullscreen mode

as you can see we used the signs "/**/"

Top comments (1)

Collapse
 
chesedgamesonline profile image
ChesedGamesOnline • Edited

That is nice. I will keep this in mind. Am a game developer and use Game Maker. The new version of it is written in C#. Maybe I should learn it, but they have their own built-in language called Game Maker Language (GML). Check out my website chesedgames.online