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.
Stellt eine Auflistung von CodeParameterDeclarationExpression-Objekten dar.
Namespace: System.CodeDom
Assembly: System (in system.dll)
Syntax
'Declaration
<SerializableAttribute> _
<ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)> _
<ComVisibleAttribute(True)> _
Public Class CodeParameterDeclarationExpressionCollection
Inherits CollectionBase
'Usage
Dim instance As CodeParameterDeclarationExpressionCollection
[SerializableAttribute]
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)]
[ComVisibleAttribute(true)]
public class CodeParameterDeclarationExpressionCollection : CollectionBase
[SerializableAttribute]
[ClassInterfaceAttribute(ClassInterfaceType::AutoDispatch)]
[ComVisibleAttribute(true)]
public ref class CodeParameterDeclarationExpressionCollection : public CollectionBase
/** @attribute SerializableAttribute() */
/** @attribute ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch) */
/** @attribute ComVisibleAttribute(true) */
public class CodeParameterDeclarationExpressionCollection extends CollectionBase
SerializableAttribute
ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)
ComVisibleAttribute(true)
public class CodeParameterDeclarationExpressionCollection extends CollectionBase
Hinweise
Die CodeParameterDeclarationExpressionCollection-Klasse stellt ein einfaches Auflistungsobjekt dar, das zum Speichern einer Reihe von CodeParameterDeclarationExpression-Objekten verwendet werden kann.
Beispiel
' Creates an empty CodeParameterDeclarationExpressionCollection.
Dim collection As New CodeParameterDeclarationExpressionCollection()
' Adds a CodeParameterDeclarationExpression to the collection.
collection.Add(New CodeParameterDeclarationExpression(GetType(Integer), "testIntArgument"))
' Adds an array of CodeParameterDeclarationExpression objects
' to the collection.
Dim parameters As CodeParameterDeclarationExpression() = {New CodeParameterDeclarationExpression(GetType(Integer), "testIntArgument"), New CodeParameterDeclarationExpression(GetType(Boolean), "testBoolArgument")}
collection.AddRange(parameters)
' Adds a collection of CodeParameterDeclarationExpression
' objects to the collection.
Dim parametersCollection As New CodeParameterDeclarationExpressionCollection()
parametersCollection.Add(New CodeParameterDeclarationExpression(GetType(Integer), "testIntArgument"))
parametersCollection.Add(New CodeParameterDeclarationExpression(GetType(Boolean), "testBoolArgument"))
collection.AddRange(parametersCollection)
' Tests for the presence of a CodeParameterDeclarationExpression
' in the collection, and retrieves its index if it is found.
Dim testParameter As New CodeParameterDeclarationExpression(GetType(Integer), "testIntArgument")
Dim itemIndex As Integer = -1
If collection.Contains(testParameter) Then
itemIndex = collection.IndexOf(testParameter)
End If
' Copies the contents of the collection beginning at index 0 to the specified CodeParameterDeclarationExpression array.
' 'parameters' is a CodeParameterDeclarationExpression array.
collection.CopyTo(parameters, 0)
' Retrieves the count of the items in the collection.
Dim collectionCount As Integer = collection.Count
' Inserts a CodeParameterDeclarationExpression at index 0
' of the collection.
collection.Insert(0, New CodeParameterDeclarationExpression(GetType(Integer), "testIntArgument"))
' Removes the specified CodeParameterDeclarationExpression
' from the collection.
Dim parameter As New CodeParameterDeclarationExpression(GetType(Integer), "testIntArgument")
collection.Remove(parameter)
' Removes the CodeParameterDeclarationExpression at index 0.
collection.RemoveAt(0)
// Creates an empty CodeParameterDeclarationExpressionCollection.
CodeParameterDeclarationExpressionCollection collection = new CodeParameterDeclarationExpressionCollection();
// Adds a CodeParameterDeclarationExpression to the collection.
collection.Add( new CodeParameterDeclarationExpression(typeof(int), "testIntArgument") );
// Adds an array of CodeParameterDeclarationExpression objects
// to the collection.
CodeParameterDeclarationExpression[] parameters = { new CodeParameterDeclarationExpression(typeof(int), "testIntArgument"), new CodeParameterDeclarationExpression(typeof(bool), "testBoolArgument") };
collection.AddRange( parameters );
// Adds a collection of CodeParameterDeclarationExpression objects
// to the collection.
CodeParameterDeclarationExpressionCollection parametersCollection = new CodeParameterDeclarationExpressionCollection();
parametersCollection.Add( new CodeParameterDeclarationExpression(typeof(int), "testIntArgument") );
parametersCollection.Add( new CodeParameterDeclarationExpression(typeof(bool), "testBoolArgument") );
collection.AddRange( parametersCollection );
// Tests for the presence of a CodeParameterDeclarationExpression
// in the collection, and retrieves its index if it is found.
CodeParameterDeclarationExpression testParameter = new CodeParameterDeclarationExpression(typeof(int), "testIntArgument");
int itemIndex = -1;
if( collection.Contains( testParameter ) )
itemIndex = collection.IndexOf( testParameter );
// Copies the contents of the collection beginning at index 0 to the specified CodeParameterDeclarationExpression array.
// 'parameters' is a CodeParameterDeclarationExpression array.
collection.CopyTo( parameters, 0 );
// Retrieves the count of the items in the collection.
int collectionCount = collection.Count;
// Inserts a CodeParameterDeclarationExpression at index 0
// of the collection.
collection.Insert( 0, new CodeParameterDeclarationExpression(typeof(int), "testIntArgument") );
// Removes the specified CodeParameterDeclarationExpression
// from the collection.
CodeParameterDeclarationExpression parameter = new CodeParameterDeclarationExpression(typeof(int), "testIntArgument");
collection.Remove( parameter );
// Removes the CodeParameterDeclarationExpression at index 0.
collection.RemoveAt(0);
// Creates an empty CodeParameterDeclarationExpressionCollection.
CodeParameterDeclarationExpressionCollection^ collection = gcnew CodeParameterDeclarationExpressionCollection;
// Adds a CodeParameterDeclarationExpression to the collection.
collection->Add( gcnew CodeParameterDeclarationExpression( int::typeid,"testIntArgument" ) );
// Adds an array of CodeParameterDeclarationExpression objects
// to the collection.
array<CodeParameterDeclarationExpression^>^parameters = {gcnew CodeParameterDeclarationExpression( int::typeid,"testIntArgument" ),gcnew CodeParameterDeclarationExpression( bool::typeid,"testBoolArgument" )};
collection->AddRange( parameters );
// Adds a collection of CodeParameterDeclarationExpression objects
// to the collection.
CodeParameterDeclarationExpressionCollection^ parametersCollection = gcnew CodeParameterDeclarationExpressionCollection;
parametersCollection->Add( gcnew CodeParameterDeclarationExpression( int::typeid,"testIntArgument" ) );
parametersCollection->Add( gcnew CodeParameterDeclarationExpression( bool::typeid,"testBoolArgument" ) );
collection->AddRange( parametersCollection );
// Tests for the presence of a CodeParameterDeclarationExpression
// in the collection, and retrieves its index if it is found.
CodeParameterDeclarationExpression^ testParameter = gcnew CodeParameterDeclarationExpression( int::typeid,"testIntArgument" );
int itemIndex = -1;
if ( collection->Contains( testParameter ) )
itemIndex = collection->IndexOf( testParameter );
// Copies the contents of the collection beginning at index 0 to the specified CodeParameterDeclarationExpression array.
// 'parameters' is a CodeParameterDeclarationExpression array.
collection->CopyTo( parameters, 0 );
// Retrieves the count of the items in the collection.
int collectionCount = collection->Count;
// Inserts a CodeParameterDeclarationExpression at index 0
// of the collection.
collection->Insert( 0, gcnew CodeParameterDeclarationExpression( int::typeid,"testIntArgument" ) );
// Removes the specified CodeParameterDeclarationExpression
// from the collection.
CodeParameterDeclarationExpression^ parameter = gcnew CodeParameterDeclarationExpression( int::typeid,"testIntArgument" );
collection->Remove( parameter );
// Removes the CodeParameterDeclarationExpression at index 0.
collection->RemoveAt( 0 );
// Creates an empty CodeParameterDeclarationExpressionCollection.
CodeParameterDeclarationExpressionCollection collection = new
CodeParameterDeclarationExpressionCollection();
// Adds a CodeParameterDeclarationExpression to the collection.
collection.Add(new CodeParameterDeclarationExpression(int.class.ToType(),
"testIntArgument"));
// Adds an array of CodeParameterDeclarationExpression objects
// to the collection.
CodeParameterDeclarationExpression parameters[] = { new
CodeParameterDeclarationExpression(int.class.ToType(),
"testIntArgument"), new CodeParameterDeclarationExpression(
boolean.class.ToType(), "testBoolArgument") };
collection.AddRange(parameters);
// Adds a collection of CodeParameterDeclarationExpression objects
// to the collection.
CodeParameterDeclarationExpressionCollection parametersCollection = new
CodeParameterDeclarationExpressionCollection();
parametersCollection.Add(new CodeParameterDeclarationExpression(int.
class.ToType(), "testIntArgument"));
parametersCollection.Add(new CodeParameterDeclarationExpression(boolean.
class.ToType(), "testBoolArgument"));
collection.AddRange(parametersCollection);
// Tests for the presence of a CodeParameterDeclarationExpression
// in the collection, and retrieves its index if it is found.
CodeParameterDeclarationExpression testParameter = new
CodeParameterDeclarationExpression(int.class.ToType(),
"testIntArgument");
int itemIndex = -1;
if (collection.Contains(testParameter)) {
itemIndex = collection.IndexOf(testParameter);
}
// Copies the contents of the collection beginning at index 0 to
// the specified CodeParameterDeclarationExpression array.
// 'parameters' is a CodeParameterDeclarationExpression array.
collection.CopyTo(parameters, 0);
// Retrieves the count of the items in the collection.
int collectionCount = collection.get_Count();
// Inserts a CodeParameterDeclarationExpression at index 0
// of the collection.
collection.Insert(0, new CodeParameterDeclarationExpression(int.
class.ToType(), "testIntArgument"));
// Removes the specified CodeParameterDeclarationExpression
// from the collection.
CodeParameterDeclarationExpression parameter = new
CodeParameterDeclarationExpression(int.class.ToType(),
"testIntArgument");
collection.Remove(parameter);
// Removes the CodeParameterDeclarationExpression at index 0.
collection.RemoveAt(0);
} //CodeParameterDeclarationExpressionCollectionExample
} //Class1
Vererbungshierarchie
System.Object
System.Collections.CollectionBase
System.CodeDom.CodeParameterDeclarationExpressionCollection
Threadsicherheit
Alle öffentlichen statischen (Shared in Visual Basic) Member dieses Typs sind threadsicher. Bei Instanzmembern ist die Threadsicherheit nicht gewährleistet.
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
CodeParameterDeclarationExpressionCollection-Member
System.CodeDom-Namespace
CodeParameterDeclarationExpression-Klasse