共用方式為


SPEventReceiverDefinitionCollection.Add method (Guid, SPList)

建立事件接收器定義中指定的 GUID 與Microsoft SharePoint Foundation清單為基礎的集合。

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public Function Add ( _
    Id As Guid, _
    contextList As SPList _
) As SPEventReceiverDefinition
'用途
Dim instance As SPEventReceiverDefinitionCollection
Dim Id As Guid
Dim contextList As SPList
Dim returnValue As SPEventReceiverDefinition

returnValue = instance.Add(Id, contextList)
public SPEventReceiverDefinition Add(
    Guid Id,
    SPList contextList
)

參數

  • Id
    Type: System.Guid

    System.Guid ,表示事件接收器定義。

傳回值

Type: Microsoft.SharePoint.SPEventReceiverDefinition
SPEventReceiverDefinition 物件,表示事件接收器定義。

請參閱

參照

SPEventReceiverDefinitionCollection class

SPEventReceiverDefinitionCollection members

Add overload

Microsoft.SharePoint namespace

SPEventReceiverType

SPField

SPItem