다음을 통해 공유


Exception.ToString Method

Creates and returns a string representation of the current exception.

Namespace: System
Assembly: mscorlib (in mscorlib.dll)

Syntax

public override string ToString ()

Return Value

A string representation of the current exception.

Remarks

The ToString method returns a representation of the current exception that should be understandable to humans. If the exception contains culture-sensitive data, you must take into account the current system culture when you write the string representation returned by ToString. Although there are no exact requirements for the format of the string that is returned, it should reflect the value of the object, as perceived by the user.

Version Information

Available in the .NET Micro Framework versions 2.0, 2.5, 3.0, 4.0, and 4.1.

See Also

Reference

Exception Class
Exception Members
System Namespace