ChecksumAlgorithmId Property
Collapse the table of content
Expand the table of content

CodeChecksumPragma.ChecksumAlgorithmId Property


Gets or sets a GUID that identifies the checksum algorithm to use.

Namespace:   System.CodeDom
Assembly:  System (in System.dll)

public Guid ChecksumAlgorithmId { get; set; }

Property Value

Type: System.Guid

A Guid that identifies the checksum algorithm to use.

Algorithms are provided for the MD5 and SHA1 hashes. The GUID value to use for the MD5 hash is {0x406ea660, 0x64cf, 0x4c82, 0xb6, 0xf0, 0x42, 0xd4, 0x81, 0x72, 0xa7, 0x99}. The GUID to use for the SHA1 hash is {0xff1816ec, 0xaa5e, 0x4d10, 0x87, 0xf7, 0x6f, 0x49, 0x63, 0x83, 0x34, 0x60}.

The calculation of the checksum is language-specific. That is, the language vendor can use any of the hashing algorithms known to the debugger to calculate the checksum. The use of a GUID for this property provides hash algorithm extensibility.

The following code example shows the setting of the ChecksumAlgorithmId property. This code example is part of a larger example provided for the CodeChecksumPragma class.

pragma1.ChecksumAlgorithmId = HashMD5;

.NET Framework
Available since 2.0
Return to top
© 2015 Microsoft