_Exception.InnerException 属性

定义

为 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

一个 Exception 的实例,描述导致当前异常的错误。An instance of Exception that describes the error that caused the current exception. InnerException 属性返回与传递给构造函数的值相同的值,或者,如果没有向构造函数提供内部异常值,则返回空引用(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.

注解

此方法用于从非托管代码访问托管类,不应从托管代码调用。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.

适用于

另请参阅