WebBaseEventCollection(ICollection) 构造函数

定义

初始化 WebBaseEventCollection 类的新实例。

public:
 WebBaseEventCollection(System::Collections::ICollection ^ events);
public WebBaseEventCollection (System.Collections.ICollection events);
new System.Web.Management.WebBaseEventCollection : System.Collections.ICollection -> System.Web.Management.WebBaseEventCollection
Public Sub New (events As ICollection)

参数

events
ICollection

WebBaseEvent 对象的集合。

例外

eventsnull

示例

下面的代码示例演示如何使用此构造函数。


// Create an event collection.
// Add to it the created simulatedEvents.
public static void AddEvents()
{
    events = 
    new System.Web.Management.WebBaseEventCollection(
    simulatedEvents);
}
' Create an event collection.
' Add to it the created simulatedEvents.
Public Shared Sub AddEvents() 
    events = _
    New System.Web.Management.WebBaseEventCollection(simulatedEvents)

End Sub

注解

构造 WebBaseEventCollection(ICollection) 函数允许你创建类的 WebBaseEventCollection 实例,并使用对象的集合 WebBaseEvent 对其进行初始化。

适用于

另请参阅