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

other

Glossary Item Box

Returns true if the other object is equal to this one

Syntax

Visual Basic (Declaration) 
Public Overloads Function Equals( _
   ByVal other As Crc32 _
) As Boolean
C# 
public bool Equals( 
   Crc32 other
)

Parameters

other

Example

Library/Library.Test/TestCrc32.cs

C#Copy Code
Crc32 empty = new Crc32();
Crc32 value = new Crc32("Hello");
Crc32 copy = new Crc32(value.Value);

Assert.IsTrue(value.Equals(copy));
Assert.IsFalse(value.Equals(empty));
Assert.IsTrue(value.Equals(copy.Value));
Assert.IsFalse(value.Equals(empty.Value));

Assert.IsTrue(value.Equals((object)copy));
Assert.IsFalse(value.Equals((object)empty));
Assert.IsTrue(value.Equals((object)copy.Value));
Assert.IsFalse(value.Equals((object)empty.Value));
VB.NETCopy Code
Dim empty As New Crc32()
Dim value As New Crc32("Hello")
Dim copy As New Crc32(value.Value)

Assert.IsTrue(value.Equals(copy))
Assert.IsFalse(value.Equals(empty))
Assert.IsTrue(value.Equals(copy.Value))
Assert.IsFalse(value.Equals(empty.Value))

Assert.IsTrue(value.Equals(DirectCast(copy, Object)))
Assert.IsFalse(value.Equals(DirectCast(empty, Object)))
Assert.IsTrue(value.Equals(DirectCast(copy.Value, Object)))
Assert.IsFalse(value.Equals(DirectCast(empty.Value, Object)))

Requirements

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

See Also

Generated with Document! X 2011 by Innovasys