共用方式為


CodeSnippetExpression 建構函式

定義

初始化 CodeSnippetExpression 類別的新執行個體。

多載

CodeSnippetExpression()

初始化 CodeSnippetExpression 類別的新執行個體。

CodeSnippetExpression(String)

使用指定的常值運算式,來初始化 CodeSnippetExpression 類別的新執行個體。

CodeSnippetExpression()

來源:
CodeSnippetExpression.cs
來源:
CodeSnippetExpression.cs
來源:
CodeSnippetExpression.cs

初始化 CodeSnippetExpression 類別的新執行個體。

public:
 CodeSnippetExpression();
public CodeSnippetExpression ();
Public Sub New ()

適用於

CodeSnippetExpression(String)

來源:
CodeSnippetExpression.cs
來源:
CodeSnippetExpression.cs
來源:
CodeSnippetExpression.cs

使用指定的常值運算式,來初始化 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")

適用於