EventSource.ConstructionException 属性

定义

获取在事件源的构造过程中引发的任何异常。Gets any exception that was thrown during the construction of the event source.

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

属性值

Exception

在事件源的构造过程中引发的异常;如果没有引发异常,则为 nullThe exception that was thrown during the construction of the event source, or null if no exception was thrown.

注解

EventSource 构造函数不会引发异常。EventSource constructors do not throw exceptions. 相反,引发的任何异常都将分配给 ConstructionException 属性并通过方法进行记录 Trace.WriteLineInstead, any exception that is thrown is assigned to the ConstructionException property and logged by the Trace.WriteLine method.

适用于