checked Operator4 Integer Overflow C# with Example



checked Operator4 Integer Overflow C# with Example

 using System;

namespace CSharpFundamentals
{
    class checkedOperator4IntegerOverflow
    {
        private static void Main(string[] args)
        {
			int value1 = int.MinValue;
			Console.WriteLine("Minimum Range of Integer: {0}", value1);
			
			int total = checked(value1-1);
			Console.WriteLine("Maximum Range of Integer: {0}", total);
        }
    }
}
 

0 Comment's

Comment Form