_Exception.InnerException _Exception.InnerException _Exception.InnerException _Exception.InnerException Property

定義

為 COM 物件提供與版本無關的 InnerException 屬性之存取權。Provides COM objects with version-independent access to the InnerException property.

public:
 property Exception ^ InnerException { Exception ^ get(); };
public Exception InnerException { get; }
member this.InnerException : Exception
Public ReadOnly Property InnerException As Exception

屬性值

Exception 的執行個體,描述造成目前例外狀況的錯誤。An instance of Exception that describes the error that caused the current exception. InnerException 屬性會傳回與傳遞到建構函式相同的值,但如果沒有提供內部例外狀況值給建構函式,則會傳回 Null 參考 (在 Visual Basic 中為 Nothing)。The InnerException property returns the same value that was passed to the constructor, or a null reference (Nothing in Visual Basic) if the inner exception value was not supplied to the constructor. 這是唯讀的屬性。This property is read-only.

備註

這個方法會從 unmanaged 程式碼會存取 managed 類別,並不會呼叫從 managed 程式碼。This method is for access to managed classes from unmanaged code and should not be called from managed code.

Exception.InnerException屬性會取得Exception造成目前例外狀況的執行個體。The Exception.InnerException property gets the Exception instance that caused the current exception.

適用於

另請參閱