CodeLinePragma Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the CodeLinePragma class.
Overloads
CodeLinePragma() |
Initializes a new instance of the CodeLinePragma class. |
CodeLinePragma(String, Int32) |
Initializes a new instance of the CodeLinePragma class. |
CodeLinePragma()
- Source:
- CodeLinePragma.cs
- Source:
- CodeLinePragma.cs
- Source:
- CodeLinePragma.cs
Initializes a new instance of the CodeLinePragma class.
public:
CodeLinePragma();
public CodeLinePragma ();
Public Sub New ()
Remarks
If you use this constructor you should also set the LineNumber and FileName properties.
Applies to
CodeLinePragma(String, Int32)
- Source:
- CodeLinePragma.cs
- Source:
- CodeLinePragma.cs
- Source:
- CodeLinePragma.cs
Initializes a new instance of the CodeLinePragma class.
public:
CodeLinePragma(System::String ^ fileName, int lineNumber);
public CodeLinePragma (string fileName, int lineNumber);
new System.CodeDom.CodeLinePragma : string * int -> System.CodeDom.CodeLinePragma
Public Sub New (fileName As String, lineNumber As Integer)
Parameters
- fileName
- String
The file name of the associated file.
- lineNumber
- Int32
The line number to store a reference to.
Examples
The following code example demonstrates the use of the CodeLinePragma class to reference a specific line of a source file.
// Creates a CodeLinePragma that references line 100 of the file "example.cs".
CodeLinePragma^ pragma = gcnew CodeLinePragma( "example.cs",100 );
// Creates a CodeLinePragma that references line 100 of the file "example.cs".
CodeLinePragma pragma = new CodeLinePragma("example.cs", 100);
' Creates a CodeLinePragma that references line 100 of the file "example.cs".
Dim pragma As New CodeLinePragma("example.cs", 100)