Represents a specific location within a specific file.
public class CodeLinePragma
CodeLinePragma type exposes the following members.
Name Description FileName Gets or sets the name of the associated file. LineNumber Gets or sets the line number of the associated reference. Top
Name Description Equals(Object) Determines whether the specified object is equal to the current object. (Inherited from Object.) Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) GetHashCode Serves as the default hash function. (Inherited from Object.) GetType Gets the (Inherited from of the current instance. Type Object.) MemberwiseClone Creates a shallow copy of the current (Inherited from . Object Object.) ToString Returns a string that represents the current object. (Inherited from Object.) Top 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. CodeLinePragma
The following code example demonstrates the use of the
class to reference a specific line of a source file. CodeLinePragma
// Creates a CodeLinePragma that references line 100 of the file "example.cs".
CodeLinePragma pragma = new CodeLinePragma( "example.cs", 100);
Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
.NET Framework Client Profile
Supported in: 4, 3.5 SP1
in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.