CodeAttributeArgumentCollection.Add(CodeAttributeArgument) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
将指定的 CodeAttributeArgument 对象添加到集合中。
public:
int Add(System::CodeDom::CodeAttributeArgument ^ value);
public int Add(System.CodeDom.CodeAttributeArgument value);
member this.Add : System.CodeDom.CodeAttributeArgument -> int
Public Function Add (value As CodeAttributeArgument) As Integer
参数
- value
- CodeAttributeArgument
要 CodeAttributeArgument 添加的对象。
返回
插入新元素的索引。
示例
以下示例演示如何将对象添加到CodeAttributeArgumentCodeAttributeArgumentCollection实例。
// Adds a CodeAttributeArgument to the collection.
collection.Add( new CodeAttributeArgument("Test Boolean Argument", new CodePrimitiveExpression(true)) );
' Adds a CodeAttributeArgument to the collection.
collection.Add(New CodeAttributeArgument("Test Boolean Argument", New CodePrimitiveExpression(True)))