共用方式為


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 加以初始化。

適用於

另請參閱