Adds a byte to the checksum
Syntax
Visual Basic (Declaration) | |
---|
Overloads Public Operator +( _
ByVal chksum As Crc32, _
ByVal b As Byte _
) As Crc32 |
Parameters
- chksum
- b
Example
Library/Library.Test/TestCrc32.cs
C# | Copy Code |
---|
Crc32 all = new Crc32(new byte[] { 0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8 });
Crc32 crc = new Crc32();
Assert.AreEqual(0, crc.Value);
crc += new byte[] { 0x1, 0x2, 0x3, 0x4 };
crc += 0x5;
crc += 0x6;
crc += 0x7;
crc += 0x8;
Assert.AreEqual(all.Value, crc.Value); |
VB.NET | Copy Code |
---|
Dim all As New Crc32(New Byte() {&H1, &H2, &H3, &H4, &H5, &H6, _
&H7, &H8})
Dim crc As New Crc32()
Assert.AreEqual(0, crc.Value)
crc += New Byte() {&H1, &H2, &H3, &H4}
crc += &H5
crc += &H6
crc += &H7
crc += &H8
Assert.AreEqual(all.Value, crc.Value) |
Requirements
Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7
See Also