Let's have an example :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace tutorial
{
class Program
{
static void Main(string[] args)
{
int a = 0;
Console.WriteLine("minimum value of" + int.MinValue);
Console.WriteLine("maximum value of" + int.MaxValue);
Console.ReadKey();
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace tutorial
{
class Program
{
static void Main(string[] args)
{
int a = 0;
Console.WriteLine("minimum value of" + int.MinValue);
Console.WriteLine("maximum value of" + int.MaxValue);
Console.ReadKey();
}
}
}
Output
Here:
MinValue field Represents the smallest possible value of System.Int32. This field is constant.
MaxValue field Represents the largest possible value of System.Int32. This field is constant
 
Tidak ada komentar:
Posting Komentar