Прочетете на английски Редактиране

Споделяне чрез


CodeChecksumPragma Constructors

Definition

Initializes a new instance of the CodeChecksumPragma class.

Overloads

CodeChecksumPragma()

Initializes a new instance of the CodeChecksumPragma class.

CodeChecksumPragma(String, Guid, Byte[])

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

Source:
CodeChecksumPragma.cs
Source:
CodeChecksumPragma.cs
Source:
CodeChecksumPragma.cs
Source:
CodeChecksumPragma.cs
Source:
CodeChecksumPragma.cs

Initializes a new instance of the CodeChecksumPragma class.

C#
public CodeChecksumPragma();

Examples

The following code example shows the use of the CodeChecksumPragma constructor. This code example is part of a larger example provided for the CodeChecksumPragma class.

C#
CodeChecksumPragma pragma1 = new CodeChecksumPragma();

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

CodeChecksumPragma(String, Guid, Byte[])

Source:
CodeChecksumPragma.cs
Source:
CodeChecksumPragma.cs
Source:
CodeChecksumPragma.cs
Source:
CodeChecksumPragma.cs
Source:
CodeChecksumPragma.cs

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.

C#
public CodeChecksumPragma(string fileName, Guid checksumAlgorithmId, byte[] checksumData);

Parameters

fileName
String

The path to the checksum file.

checksumAlgorithmId
Guid

A Guid that identifies the checksum algorithm to use.

checksumData
Byte[]

A byte array that contains the checksum data.

Examples

The following code example shows the use of the CodeChecksumPragma constructor. This code example is part of a larger example provided for the CodeChecksumPragma class.

C#
CodeChecksumPragma pragma2 = new CodeChecksumPragma("test.txt", HashSHA1, new byte[] { 0xBB, 0xBB, 0xBB });

Remarks

For more information on the checksumAlgorithmId parameter, see the ChecksumAlgorithmId property.

Applies to

.NET 10 (package-provided) и други версии
Продукт Версии
.NET 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10