CodeChecksumPragma 建構函式
定義
初始化 CodeChecksumPragma 類別的新執行個體。Initializes a new instance of the CodeChecksumPragma class.
多載
CodeChecksumPragma() |
初始化 CodeChecksumPragma 類別的新執行個體。Initializes a new instance of the CodeChecksumPragma class. |
CodeChecksumPragma(String, Guid, Byte[]) |
使用檔案名稱、表示總和檢查碼演算法的 GUID,以及表示總和檢查碼資料的位元組資料流,初始化 CodeChecksumPragma 類別的新執行個體。Initializes a new instance of the CodeChecksumPragma class using a file name, a GUID representing the checksum algorithm, and a byte stream representing the checksum data. |
CodeChecksumPragma()
初始化 CodeChecksumPragma 類別的新執行個體。Initializes a new instance of the CodeChecksumPragma class.
public:
CodeChecksumPragma();
public CodeChecksumPragma ();
Public Sub New ()
範例
下列程式碼範例示範如何使用此CodeChecksumPragma函數。The following code example shows the use of the CodeChecksumPragma constructor. 這個程式碼範例是針對CodeChecksumPragma類別提供之較大範例的一部分。This code example is part of a larger example provided for the CodeChecksumPragma class.
CodeChecksumPragma pragma1 = new CodeChecksumPragma();
Dim pragma1 As New CodeChecksumPragma()
CodeChecksumPragma(String, Guid, Byte[])
使用檔案名稱、表示總和檢查碼演算法的 GUID,以及表示總和檢查碼資料的位元組資料流,初始化 CodeChecksumPragma 類別的新執行個體。Initializes a new instance of the CodeChecksumPragma class using a file name, a GUID representing the checksum algorithm, and a byte stream representing the checksum data.
public:
CodeChecksumPragma(System::String ^ fileName, Guid checksumAlgorithmId, cli::array <System::Byte> ^ checksumData);
public CodeChecksumPragma (string fileName, Guid checksumAlgorithmId, byte[] checksumData);
new System.CodeDom.CodeChecksumPragma : string * Guid * byte[] -> System.CodeDom.CodeChecksumPragma
Public Sub New (fileName As String, checksumAlgorithmId As Guid, checksumData As Byte())
參數
- fileName
- String
總和檢查碼檔案的路徑。The path to the checksum file.
- checksumData
- Byte[]
包含總和檢查碼資料的位元組陣列。A byte array that contains the checksum data.
範例
下列程式碼範例示範如何使用此CodeChecksumPragma函數。The following code example shows the use of the CodeChecksumPragma constructor. 這個程式碼範例是針對CodeChecksumPragma類別提供之較大範例的一部分。This code example is part of a larger example provided for the CodeChecksumPragma class.
CodeChecksumPragma pragma2 = new CodeChecksumPragma("test.txt", HashSHA1, new byte[] { 0xBB, 0xBB, 0xBB });
Dim pragma2 As New CodeChecksumPragma("test.txt", HashSHA1, New Byte() {&HBB, &HBB, &HBB})
備註
如需參數的checksumAlgorithmId
詳細資訊, ChecksumAlgorithmId請參閱屬性。For more information on the checksumAlgorithmId
parameter, see the ChecksumAlgorithmId property.