CodeLinePragma 類別

定義

表示特定檔案內的特定位置。

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
繼承
CodeLinePragma
屬性

範例

下列程式代碼範例示範如何使用 CodeLinePragma 類別來參考原始程序檔的特定行。

// 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)

備註

CodeLinePragma 可用來表示檔案內的特定位置。 這類物件通常會在編譯之後透過偵錯工具來儲存相關聯程式代碼專案的位置,例如與編譯程式警告和錯誤相關聯的位置參考。

建構函式

CodeLinePragma()

初始化 CodeLinePragma 類別的新執行個體。

CodeLinePragma(String, Int32)

初始化 CodeLinePragma 類別的新執行個體。

屬性

FileName

取得或設定相關檔案的名稱。

LineNumber

取得或設定相關參考的行號。

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於