แก้ไข

แชร์ผ่าน


CodeStatementCollection.Add Method

Definition

Adds the specified CodeStatement to the collection.

Overloads

Add(CodeExpression)

Adds the specified CodeExpression object to the collection.

Add(CodeStatement)

Adds the specified CodeStatement object to the collection.

Add(CodeExpression)

Source:
CodeStatementCollection.cs
Source:
CodeStatementCollection.cs
Source:
CodeStatementCollection.cs
Source:
CodeStatementCollection.cs

Adds the specified CodeExpression object to the collection.

public:
 int Add(System::CodeDom::CodeExpression ^ value);
public int Add (System.CodeDom.CodeExpression value);
member this.Add : System.CodeDom.CodeExpression -> int
Public Function Add (value As CodeExpression) As Integer

Parameters

value
CodeExpression

The CodeExpression object to add.

Returns

The index at which the new element was inserted.

See also

Applies to

Add(CodeStatement)

Source:
CodeStatementCollection.cs
Source:
CodeStatementCollection.cs
Source:
CodeStatementCollection.cs
Source:
CodeStatementCollection.cs

Adds the specified CodeStatement object to the collection.

public:
 int Add(System::CodeDom::CodeStatement ^ value);
public int Add (System.CodeDom.CodeStatement value);
member this.Add : System.CodeDom.CodeStatement -> int
Public Function Add (value As CodeStatement) As Integer

Parameters

value
CodeStatement

The CodeStatement object to add.

Returns

The index at which the new element was inserted.

Examples

The following example demonstrates how to add a CodeStatement object to a CodeStatementCollection instance.

// Adds a CodeStatement to the collection.
collection->Add( gcnew CodeCommentStatement( "Test comment statement" ) );
// Adds a CodeStatement to the collection.
collection.Add( new CodeCommentStatement("Test comment statement") );
' Adds a CodeStatement to the collection.
collection.Add(New CodeCommentStatement("Test comment statement"))

See also

Applies to