_Exception.ToString Method

Definition

為 COM 物件提供與版本無關的 ToString() 方法之存取權。Provides COM objects with version-independent access to the ToString() method.

public:
 System::String ^ ToString();
public string ToString ();
abstract member ToString : unit -> string
Public Function ToString () As String

Returns

String

代表目前 Exception 物件的字串。A string that represents the current Exception object.

Remarks

這個方法是用來從非受控程式碼存取 managed 類別,而且不應該從 managed 程式碼呼叫。This method is for access to managed classes from unmanaged code and should not be called from managed code.

Exception.ToString 方法會建立並傳回目前例外狀況的字串表示。The Exception.ToString method creates and returns a string representation of the current exception.

Applies to

See also