CodeSnippetExpression 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 CodeSnippetExpression 類別的新執行個體。
多載
CodeSnippetExpression() |
初始化 CodeSnippetExpression 類別的新執行個體。 |
CodeSnippetExpression(String) |
使用指定的常值運算式,來初始化 CodeSnippetExpression 類別的新執行個體。 |
CodeSnippetExpression()
初始化 CodeSnippetExpression 類別的新執行個體。
public:
CodeSnippetExpression();
public CodeSnippetExpression ();
Public Sub New ()
適用於
CodeSnippetExpression(String)
使用指定的常值運算式,來初始化 CodeSnippetExpression 類別的新執行個體。
public:
CodeSnippetExpression(System::String ^ value);
public CodeSnippetExpression (string value);
new System.CodeDom.CodeSnippetExpression : string -> System.CodeDom.CodeSnippetExpression
Public Sub New (value As String)
參數
- value
- String
要表示的常值運算式。
範例
下列程式代碼範例示範如何使用 CodeSnippetExpression 建構函式來建立 類別的 CodeSnippetExpression 實例。
// Creates a CodeSnippetExpression that represents a literal string that
// can be used as an expression in a CodeDOM graph.
CodeSnippetExpression^ literalExpression =
gcnew CodeSnippetExpression( "Literal expression" );
// Creates a CodeSnippetExpression that represents a literal string that
// can be used as an expression in a CodeDOM graph.
CodeSnippetExpression literalExpression =
new CodeSnippetExpression("Literal expression");
' Creates a CodeSnippetExpression that represents a literal string that
' can be used as an expression in a CodeDOM graph.
Dim literalExpression As New CodeSnippetExpression("Literal expression")