Mega Code Archive

 
Categories / C# / Language Basics
 

Use new with a value type

/* C#: The Complete Reference  by Herbert Schildt  Publisher: Osborne/McGraw-Hill (March 8, 2002) ISBN: 0072134852 */ // Use new with a value type.    using System;    public class newValue {     public static void Main() {       int i = new int(); // initialize i to zero        Console.WriteLine("The value of i is: " + i);    }   }