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 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈