.NET Framework Class Library  

StackOverflowException Class

The exception that is thrown when the execution stack overflows by having too many pending method calls. This class cannot be inherited.

For a list of all members of this type, see StackOverflowException Members.

System.Object
   System.Exception
      System.SystemException
         System.StackOverflowException

[Visual Basic]
<Serializable>
NotInheritable Public Class StackOverflowException
   Inherits SystemException
[C#]
[Serializable]
public sealed class StackOverflowException : SystemException
[C++]
[Serializable]
public __gc __sealed class StackOverflowException : public
   SystemException
[JScript]
public
   Serializable
class StackOverflowException extends SystemException

Thread Safety

Any public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Any instance members are not guaranteed to be thread safe.

Remarks

StackOverflowException is thrown for execution stack overflow errors, typically in case of a very deep or unbounded recursion.

The Localloc Microsoft intermediate language (MSIL) instruction throws StackOverflowException.

StackOverflowException uses the HRESULT COR_E_STACKOVERFLOW, that has the value 0x800703E9.

For a list of initial property values for an instance of StackOverflowException, see the StackOverflowException constructors.

Requirements

Namespace: System

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework - Windows CE .NET

Assembly: Mscorlib (in Mscorlib.dll)

See Also

StackOverflowException Members | System Namespace | Exception | Handling and Throwing Exceptions