CodeAttributeDeclarationCollection.Add(CodeAttributeDeclaration) Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Hiermee voegt u een CodeAttributeDeclaration object met de opgegeven waarde toe aan de verzameling.
public:
int Add(System::CodeDom::CodeAttributeDeclaration ^ value);
public int Add(System.CodeDom.CodeAttributeDeclaration value);
member this.Add : System.CodeDom.CodeAttributeDeclaration -> int
Public Function Add (value As CodeAttributeDeclaration) As Integer
Parameters
- value
- CodeAttributeDeclaration
Het CodeAttributeDeclaration object dat moet worden toegevoegd.
Retouren
De index waarop het nieuwe element is ingevoegd.
Voorbeelden
In het volgende voorbeeld ziet u hoe u een CodeAttributeDeclaration object toevoegt aan een CodeAttributeDeclarationCollection exemplaar.
// Adds a CodeAttributeDeclaration to the collection.
collection.Add( new CodeAttributeDeclaration("DescriptionAttribute", new CodeAttributeArgument(new CodePrimitiveExpression("Test Description"))) );
' Adds a CodeAttributeDeclaration to the collection.
collection.Add(New CodeAttributeDeclaration("DescriptionAttribute", New CodeAttributeArgument(New CodePrimitiveExpression("Test Description"))))