C# Unchecked Statement

In this article i am explaining about Unchecked key word. The unchecked statement ignores the stack overflow exception and executes the program so, the output can be incorrect. Example: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Unchecked_Statement {     class Program     {         static void Main(string[] args)         {             int n;             // assign maximum value             n = int.MaxValue; […]

Continue Reading →
 

C# Checked Statement

In this article about checked statement. The checked statements force fully C# to raise exception whenever underflow or stack overflow exception occurs due to integral type arithmetic or conversion issues. Example: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace CheckedStatementExample {     class Program     {         static void Main(string[] args)         {             int n;             // assign maximum […]

Continue Reading →