CodeLinePragma CodeLinePragma CodeLinePragma CodeLinePragma Class

Definition

Represents a specific location within a specific file.

public ref class CodeLinePragma
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
[System.Serializable]
public class CodeLinePragma
type CodeLinePragma = class
Public Class CodeLinePragma
Inheritance
CodeLinePragmaCodeLinePragmaCodeLinePragmaCodeLinePragma
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() CodeLinePragma() CodeLinePragma() CodeLinePragma()

Initializes a new instance of the CodeLinePragma class.

CodeLinePragma(String, Int32) CodeLinePragma(String, Int32) CodeLinePragma(String, Int32) CodeLinePragma(String, Int32)

Initializes a new instance of the CodeLinePragma class.

Properties

FileName FileName FileName FileName

Gets or sets the name of the associated file.

LineNumber LineNumber LineNumber LineNumber

Gets or sets the line number of the associated reference.

Methods

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to