Professional Documents
Culture Documents
Basic Syntax:
using System;
namespace Helloworld;
class Program{
public static void Main(string[] args]{
Console.WriteLine(“Hello”);
}
}
Output
Comments:
Variables:
Declaring Variables
Keyword: const
Display Variables:
Names can contain letters, digits and the underscore character (_)
Names must begin with a letter or underscore
Names should start with a lowercase letter, and cannot contain
whitespace
Names are case-sensitive ("myVar" and "myvar" are different variables)
Reserved words (like C# keywords, such as int or double) cannot be used
as names
Type Casting
To read/input something
o Math.Max(x,y)
o Math.Min(x,y)
o Math.Sqrt(x)
o Math.Abs(x)
o Math.Round(x)
Different functions that can be done in a string