StackOverflowException.Message : StackOverflowException « System « C# / C Sharp by API






StackOverflowException.Message

  


using System;
   
class MainClass
{
    public static void Main()
    {
        try
        {
            Recursive();
        }
        catch(StackOverflowException)
        {
            Console.WriteLine("The CLR is out of stack space.");
        }
    }
   
    public static void Recursive()
    {
        Recursive();
    }
}

   
    
  








Related examples in the same category