public bool Equals(ChildProduct other) { if (other == default(ChildProduct)) { return(false); } return(Equals(other.ID)); }
// Operators //public static bool operator ==(ChildProduct a, ChildProduct b) //{ // if (ReferenceEquals(a, b)) // return true; // return a.Equals(b); //} //public static bool operator !=(ChildProduct a, ChildProduct b) //{ // return !(a == b); //} //public static bool operator ==(ChildProduct a, string b) //{ // return a.Equals(b); //} //public static bool operator !=(ChildProduct a, string b) //{ // return !(a == b); //} //public static bool operator ==(string a, ChildProduct b) //{ // return b.Equals(a); //} //public static bool operator !=(string a, ChildProduct b) //{ // return !(a == b); //} // ******************** // * Member Functions * // ******************** // Update Function public bool UpdateData(ChildProduct update) { if (this == update) { UpdateData(update as Product); StockStatus = update.StockStatus; return(true); } return(false); }