Output with parameters
/*
Learning C#
by Jesse Liberty
Publisher: O'Reilly
ISBN: 0596003765
*/
public class AssignedValues {
static void Main( )
{
int myInt;
//other code here...
myInt = 7; // assign to it
System.Console.WriteLine("Assigned, myInt: {0}", myInt);
myInt = 5;
System.Console.WriteLine("Reassigned, myInt: {0}", myInt);
}
}
Related examples in the same category