Share via


IVsaCodeItem.RemoveEventSource 方法

从代码项中移除指定的事件源。

命名空间:  Microsoft.Vsa
程序集:  Microsoft.Vsa(在 Microsoft.Vsa.dll 中)

语法

声明
<PermissionSetAttribute(SecurityAction.LinkDemand, Name := "FullTrust")> _
Sub RemoveEventSource ( _
    eventSourceName As String _
)
[PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")]
void RemoveEventSource(
    string eventSourceName
)
[PermissionSetAttribute(SecurityAction::LinkDemand, Name = L"FullTrust")]
void RemoveEventSource(
    String^ eventSourceName
)
[<PermissionSetAttribute(SecurityAction.LinkDemand, Name = "FullTrust")>]
abstract RemoveEventSource : 
        eventSourceName:string -> unit
function RemoveEventSource(
    eventSourceName : String
)

参数

  • eventSourceName
    类型:String

    要移除的事件源的编程名称。

备注

删除事件源将不会从源文本中删除基础的事件处理程序。 相反,事件不再引发的事件处理程序的通知。 因此,您将获得编译器错误,如果您删除事件源,但在源代码中保留基础函数。

请参阅

参考

IVsaCodeItem 接口

Microsoft.Vsa 命名空间