Uninitialized Values : Variable Definition : Language Basics C# Source Code


Custom Search

C# Source Code » Language Basics » Variable Definition »

 

Uninitialized Values








    

/*
Learning C# 
by Jesse Liberty

Publisher: O'Reilly 
ISBN: 0596003765
*/

// with compile error
public class UninitializedValues
 {
    static void Main( )
    {
       int myInt;
       System.Console.WriteLine
       ("Uninitialized, myInt: {0}",myInt);
       myInt = 5;
       System.Console.WriteLine("Assigned, myInt: {0}", myInt);
    }
 }

           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Language Basics
» Variable Definition