Declaring a variable. : Variable Definition : Language Basics C# Source Code


Custom Search

C# Source Code » Language Basics » Variable Definition »

 

Declaring a variable.








    
 


class MainClass {
    public static void Main() {
        short x;
        int y;

        double z = 0;

        x = 6;
        y = 10;
        z = x + y;
        System.Console.WriteLine("X = {0} Y = {1} Z = {2}", x, y, z);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Language Basics
» Variable Definition