_Exception.GetBaseException _Exception.GetBaseException _Exception.GetBaseException _Exception.GetBaseException Method

定义

为 COM 对象提供对 GetBaseException() 方法的与版本无关的访问。Provides COM objects with version-independent access to the GetBaseException() method.

public:
 Exception ^ GetBaseException();
public Exception GetBaseException ();
abstract member GetBaseException : unit -> Exception
Public Function GetBaseException () As Exception

返回

异常链中第一个被引发的异常。The first exception thrown in a chain of exceptions. 如果当前异常的 InnerException 属性是 null 引用(Visual Basic 中为 Nothing),则此属性返回当前异常。If the InnerException property of the current exception is a null reference (Nothing in Visual Basic), this property returns the current exception.

注解

此方法用于从非托管代码访问托管类,不应从托管代码调用。This method is for access to managed classes from unmanaged code and should not be called from managed code.

@No__t-0 方法返回 Exception,它是一个或多个后续异常的根本原因。The Exception.GetBaseException method returns the Exception that is the root cause of one or more subsequent exceptions.

适用于

另请参阅