DesignerVerbCollection.Contains 方法
获取一个值,用以指示集合中是否存在指定的 DesignerVerb。
**命名空间:**System.ComponentModel.Design
**程序集:**System(在 system.dll 中)
语法
声明
Public Function Contains ( _
value As DesignerVerb _
) As Boolean
用法
Dim instance As DesignerVerbCollection
Dim value As DesignerVerb
Dim returnValue As Boolean
returnValue = instance.Contains(value)
public bool Contains (
DesignerVerb value
)
public:
bool Contains (
DesignerVerb^ value
)
public boolean Contains (
DesignerVerb value
)
public function Contains (
value : DesignerVerb
) : boolean
参数
- value
要在集合中搜索的 DesignerVerb。
返回值
如果集合中存在指定对象,则为 true;否则为 false。
示例
' Tests for the presence of a DesignerVerb in the collection,
' and retrieves its index if it is found.
Dim testVerb As New DesignerVerb("Example designer verb", New EventHandler(AddressOf Me.ExampleEvent))
Dim itemIndex As Integer = -1
If collection.Contains(testVerb) Then
itemIndex = collection.IndexOf(testVerb)
End If
// Tests for the presence of a DesignerVerb in the collection,
// and retrieves its index if it is found.
DesignerVerb testVerb = new DesignerVerb("Example designer verb", new EventHandler(this.ExampleEvent));
int itemIndex = -1;
if( collection.Contains( testVerb ) )
itemIndex = collection.IndexOf( testVerb );
// Tests for the presence of a DesignerVerb in the collection,
// and retrieves its index if it is found.
DesignerVerb^ testVerb = gcnew DesignerVerb( "Example designer verb", gcnew EventHandler( this, &Class1::ExampleEvent ) );
int itemIndex = -1;
if ( collection->Contains( testVerb ) )
itemIndex = collection->IndexOf( testVerb );
平台
Windows 98、Windows 2000 SP4、Windows Millennium Edition、Windows Server 2003、Windows XP Media Center Edition、Windows XP Professional x64 Edition、Windows XP SP2、Windows XP Starter Edition
.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求。
版本信息
.NET Framework
受以下版本支持:2.0、1.1、1.0
请参见
参考
DesignerVerbCollection 类
DesignerVerbCollection 成员
System.ComponentModel.Design 命名空间