Export (0) Print
Expand All

CodeSnippetStatement Constructor

.NET Framework 1.1

Initializes a new instance of the CodeSnippetStatement class.

Overload List

Initializes a new instance of the CodeSnippetStatement class.

[Visual Basic] Public Sub New()
[C#] public CodeSnippetStatement();
[C++] public: CodeSnippetStatement();
[JScript] public function CodeSnippetStatement();

Initializes a new instance of the CodeSnippetStatement class using the specified code fragment.

[Visual Basic] Public Sub New(String)
[C#] public CodeSnippetStatement(string);
[C++] public: CodeSnippetStatement(String*);
[JScript] public function CodeSnippetStatement(String);

Example

[Visual Basic, C#, C++] Note   This example shows how to use one of the overloaded versions of the CodeSnippetStatement constructor. For other examples that might be available, see the individual overload topics.
[Visual Basic] 
' Creates a statement using a literal string.
Dim literalStatement As New CodeSnippetStatement( _
    "Console.Write(""Test literal statement output"")")

[C#] 
// Creates a statement using a literal string.
CodeSnippetStatement literalStatement = 
    new CodeSnippetStatement("Console.Write(\"Test literal statement output\")");            

[C++] 
// Creates a statement using a literal string.
CodeSnippetStatement* literalStatement = 
    new CodeSnippetStatement(S"Console.Write(\"Test literal statement output\")");            

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

CodeSnippetStatement Class | CodeSnippetStatement Members | System.CodeDom Namespace

Show:
© 2014 Microsoft