_Exception.ToString _Exception.ToString _Exception.ToString _Exception.ToString Method

定義

為 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

傳回

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

備註

這個方法會從 unmanaged 程式碼會存取 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.

適用於

另請參閱