int value
In this chapter you will learn:
int Max/Min value
The data type defines the max and min values which it can hold.
using System;/* jav a2 s .c om*/
class Program
{
static void Main(string[] args)
{
Console.WriteLine(int.MaxValue);
Console.WriteLine(int.MinValue);
}
}
The output:
Assign value to int value
public class Main{
static void Main( ) {
int myInt = 7;
System.Console.WriteLine("Initialized, myInt: {0}", myInt);
myInt = 5;/*from j a v a2 s .com*/
System.Console.WriteLine("After assignment, myInt: {0}",myInt);
}
}
Next chapter...
What you will learn in the next chapter:
Home » C# Tutorial » Byte, Integer, Long