C# Comments
Last modified: July 11, 2021Create a project
There are two types of comments; single line and multi-line comments.
Single line
// return a text value
string HelloWorld()
{
return "Hello World";
}
Comments on end of the line
string HelloWorld()
{
return "Hello World"; // return message
}
Multi-line comments
/* this is Hello Method
that return message:
*/
string HelloWorld()
{
return "Hello World";
}