CodeSnippetExpression 构造函数

定义

初始化 CodeSnippetExpression 类的新实例。

重载

CodeSnippetExpression()

初始化 CodeSnippetExpression 类的新实例。

CodeSnippetExpression(String)

使用指定的文本表达式初始化 CodeSnippetExpression 类的新实例。

CodeSnippetExpression()

Source:
CodeSnippetExpression.cs
Source:
CodeSnippetExpression.cs
Source:
CodeSnippetExpression.cs

初始化 CodeSnippetExpression 类的新实例。

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

适用于

CodeSnippetExpression(String)

Source:
CodeSnippetExpression.cs
Source:
CodeSnippetExpression.cs
Source:
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")

适用于