CodeStatementCollection.Add Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應