CSharpTest.Net
Add(Byte) Method
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Library Assembly > CSharpTest.Net.IO Namespace > Crc32 Structure > Add Method : Add(Byte) Method

b

Glossary Item Box

Adds a byte to the checksum

Syntax

Visual Basic (Declaration) 
Public Overloads Sub Add( _
   ByVal b As Byte _
) 
C# 
public void Add( 
   byte b
)

Parameters

b

Example

Library/Library.Test/TestCrc32.cs

C#Copy Code
Crc32 crc = new Crc32();
Assert.AreEqual(0, crc.Value);
Assert.AreEqual(0, crc.GetHashCode());

crc.Add(0x1b);

Assert.AreNotEqual(0, crc.Value);
Assert.AreEqual(crc.Value, crc.GetHashCode());
VB.NETCopy Code
Dim crc As New Crc32()
Assert.AreEqual(0, crc.Value)
Assert.AreEqual(0, crc.GetHashCode())

crc.Add(&H1b)

Assert.AreNotEqual(0, crc.Value)
Assert.AreEqual(crc.Value, crc.GetHashCode())

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys