System.CodeDom.CodeAttributeDeclarationCollection.Add C# (CSharp) Method

Add() public method

public Add ( CodeAttributeDeclaration value ) : int
value CodeAttributeDeclaration
return int
        public int Add(CodeAttributeDeclaration value) {
            return List.Add(value);
        }
        

Usage Example

 private void SetDescription(CodeAttributeDeclarationCollection customAttributes, string description)
 {
     customAttributes.Add(
         new CodeAttributeDeclaration(
             new CodeTypeReference(DESCRIPTION_ATTR),
             new CodeAttributeArgument(
                 new CodePrimitiveExpression(description))));
 }
All Usage Examples Of System.CodeDom.CodeAttributeDeclarationCollection::Add