Editar

Compartilhar via


CodeSnippetExpression Constructors

Definition

Initializes a new instance of the CodeSnippetExpression class.

Overloads

CodeSnippetExpression()

Initializes a new instance of the CodeSnippetExpression class.

CodeSnippetExpression(String)

Initializes a new instance of the CodeSnippetExpression class using the specified literal expression.

CodeSnippetExpression()

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

Initializes a new instance of the CodeSnippetExpression class.

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

Applies to

CodeSnippetExpression(String)

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

Initializes a new instance of the CodeSnippetExpression class using the specified literal expression.

public:
 CodeSnippetExpression(System::String ^ value);
public CodeSnippetExpression (string value);
new System.CodeDom.CodeSnippetExpression : string -> System.CodeDom.CodeSnippetExpression
Public Sub New (value As String)

Parameters

value
String

The literal expression to represent.

Examples

The following code example demonstrates in the use of the CodeSnippetExpression constructor to create an instance of the CodeSnippetExpression class.

// 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")

Applies to