-Code reformat
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user