Indian Admin

Simple GST Billing Software for you.

TUTORIALS

C#

Syntax :-
using System;

namespace HelloWorld
{
  class Program
  {
    static void Main(string[] args)
    {
      Console.WriteLine("Hello World!");    
    }
  }
}
Comments :-
// Single line comment
/* Multiline
comment *
Variables :-
int myNum = 7;               // Integer (whole number)
double myDoubleNum = 7.14D;  // Floating point number
char myLetter = 'S';         // Character
bool myBool = true;          // Boolean
string myText = "Sumit";     // String
Casting :-
//Implicit Casting
int myInt = 9;
double myDouble = myInt;       // Automatic casting: int to double
Console.WriteLine(myInt);      // Outputs 9
Console.WriteLine(myDouble);   // Outputs 9'
 
//Explicit Casting
double myDouble = 9.78;
int myInt = (int) myDouble;    // Manual casting: double to int
Console.WriteLine(myDouble);   // Outputs 9.78
Console.WriteLine(myInt);      // Outputs 9
moneyscout.com.au
Scroll to Top