Comments
Comments can be used to document lines in the code or to add remarks for the developers
To add a single line comment use // before the comment
To Add Multi line comment add /* before the comment and */ at the end
using System.Windows.Forms;
namespace Northwind.Training
{
class HelloWorld
{
public void Run()
{
MessageBox.Show("Hello World", "Hello World Caption", MessageBoxButton.OK);
/* this
is
a
multi line
comment
*/
MessageBox.Show("the message");;
// one line comment
MessageBox.Show("Test");
}
}
}
Exercise: Hello C#
Help us improve, Edit this page on GitHub
or email us at info@fireflymigration.com