Export (0) Print
Expand All

CodeLinePragma Class

Represents a specific location within a specific file.

For a list of all members of this type, see CodeLinePragma Members.

System.Object
   System.CodeDom.CodeLinePragma

[Visual Basic]
<Serializable>
<ClassInterface(ClassInterfaceType.AutoDispatch)>
<ComVisible(True)>
Public Class CodeLinePragma
[C#]
[Serializable]
[ClassInterface(ClassInterfaceType.AutoDispatch)]
[ComVisible(true)]
public class CodeLinePragma
[C++]
[Serializable]
[ClassInterface(ClassInterfaceType::AutoDispatch)]
[ComVisible(true)]
public __gc class CodeLinePragma
[JScript]
public
   Serializable
 ClassInterface(ClassInterfaceType.AutoDispatch)
 ComVisible(true)
class CodeLinePragma

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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.

Example

[Visual Basic] 
' Creates a CodeLinePragma that references line 100 of the file "example.cs".
Dim pragma As New CodeLinePragma("example.cs", 100)

[C#] 
// Creates a CodeLinePragma that references line 100 of the file "example.cs".
CodeLinePragma pragma = new CodeLinePragma("example.cs", 100);

[C++] 
// Creates a CodeLinePragma that references line 100 of the file "example.cs".
CodeLinePragma* pragma = new CodeLinePragma(S"example.cs", 100);

[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.

Requirements

Namespace: System.CodeDom

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System (in System.dll)

See Also

CodeLinePragma Members | System.CodeDom Namespace

Show:
© 2014 Microsoft