Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Ruft einen Wert ab, der angibt, ob die Auflistung das angegebene CodeAttributeArgument enthält.
Namespace: System.CodeDom
Assembly: System (in system.dll)
Syntax
'Declaration
Public Function Contains ( _
value As CodeAttributeArgument _
) As Boolean
'Usage
Dim instance As CodeAttributeArgumentCollection
Dim value As CodeAttributeArgument
Dim returnValue As Boolean
returnValue = instance.Contains(value)
public bool Contains (
CodeAttributeArgument value
)
public:
bool Contains (
CodeAttributeArgument^ value
)
public boolean Contains (
CodeAttributeArgument value
)
public function Contains (
value : CodeAttributeArgument
) : boolean
Parameter
- value
Ein CodeAttributeArgument, das in der Auflistung gesucht werden soll.
Rückgabewert
true, wenn die Auflistung das angegebene Objekt enthält, andernfalls false.
Beispiel
' Tests for the presence of a CodeAttributeArgument in
' the collection, and retrieves its index if it is found.
Dim testArgument As New CodeAttributeArgument("Test Boolean Argument", New CodePrimitiveExpression(True))
Dim itemIndex As Integer = -1
If collection.Contains(testArgument) Then
itemIndex = collection.IndexOf(testArgument)
End If
// Tests for the presence of a CodeAttributeArgument
// within the collection, and retrieves its index if it is found.
CodeAttributeArgument testArgument = new CodeAttributeArgument("Test Boolean Argument", new CodePrimitiveExpression(true));
int itemIndex = -1;
if( collection.Contains( testArgument ) )
itemIndex = collection.IndexOf( testArgument );
// Tests for the presence of a CodeAttributeArgument
// within the collection, and retrieves its index if it is found.
CodeAttributeArgument^ testArgument = gcnew CodeAttributeArgument( "Test Boolean Argument",gcnew CodePrimitiveExpression( true ) );
int itemIndex = -1;
if ( collection->Contains( testArgument ) )
itemIndex = collection->IndexOf( testArgument );
// Tests for the presence of a CodeAttributeArgument
// within the collection, and retrieves its index if it is found.
CodeAttributeArgument testArgument = new CodeAttributeArgument("Test "
+ "Boolean Argument",
new CodePrimitiveExpression(System.Convert.ToString(true)));
int itemIndex = -1;
if (collection.Contains(testArgument)) {
itemIndex = collection.IndexOf(testArgument);
}
Plattformen
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 unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
Siehe auch
Referenz
CodeAttributeArgumentCollection-Klasse
CodeAttributeArgumentCollection-Member
System.CodeDom-Namespace