Uredi

Deli z drugimi prek


CodeLinePragma Class

Definition

Represents a specific location within a specific file.

public ref class CodeLinePragma
public class CodeLinePragma
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public class CodeLinePragma
type CodeLinePragma = class
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type CodeLinePragma = class
Public Class CodeLinePragma
Inheritance
CodeLinePragma
Attributes

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)

Remarks

CodeLinePragma can be used to represent a specific location within a file. This type of object is often used after compilation by debugging tools to store locations of associated code elements, such as position references associated with compiler warnings and errors.

Constructors

CodeLinePragma()

Initializes a new instance of the CodeLinePragma class.

CodeLinePragma(String, Int32)

Initializes a new instance of the CodeLinePragma class.

Properties

FileName

Gets or sets the name of the associated file.

LineNumber

Gets or sets the line number of the associated reference.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to