-Code reformat

This commit is contained in:
James Newton-King
2013-10-20 15:08:39 +13:00
parent d03963016e
commit bcd6982419
466 changed files with 71645 additions and 71598 deletions
@@ -27,28 +27,28 @@ using System;
namespace Newtonsoft.Json.Tests.TestObjects
{
public class Product
{
public string Name;
public DateTime ExpiryDate = new DateTime(2000, 1, 1, 0, 0, 0, DateTimeKind.Utc);
public decimal Price;
public string[] Sizes;
public override bool Equals(object obj)
public class Product
{
if (obj is Product)
{
Product p = (Product)obj;
public string Name;
public DateTime ExpiryDate = new DateTime(2000, 1, 1, 0, 0, 0, DateTimeKind.Utc);
public decimal Price;
public string[] Sizes;
return (p.Name == Name && p.ExpiryDate == ExpiryDate && p.Price == Price);
}
public override bool Equals(object obj)
{
if (obj is Product)
{
Product p = (Product)obj;
return base.Equals(obj);
return (p.Name == Name && p.ExpiryDate == ExpiryDate && p.Price == Price);
}
return base.Equals(obj);
}
public override int GetHashCode()
{
return (Name ?? string.Empty).GetHashCode();
}
}
public override int GetHashCode()
{
return (Name ?? string.Empty).GetHashCode();
}
}
}