NUnit.Samples.Money.MoneyBag.GetHashCode C# (CSharp) Method

GetHashCode() public method

public GetHashCode ( ) : int
return int
        public override int GetHashCode()
        {
            int hash= 0;
              foreach (Money m in fMonies) {
            hash^= m.GetHashCode();
              }
              return hash;
        }

Usage Example

Example #1
0
		public void MoneyBagHash() 
		{
			MoneyBag equal= new MoneyBag(new Money(12, "CHF"), new Money(7, "USD"));
			Assert.AreEqual(fMB1.GetHashCode(), equal.GetHashCode());
		}
All Usage Examples Of NUnit.Samples.Money.MoneyBag::GetHashCode