[DOTNET] FW: Implementing Equals

2002-05-17 Thread Yong Xu
Never mind. I tried this out as Jeffrey Richter suggested and GetType always return the same type, no matter you call it in base or derived. Yong > -Original Message- > From: Yong Xu > Sent: Friday, May 17, 2002 10:28 AM > To: '[EMAIL PROTECTED]' > S

[DOTNET] Implementing Equals

2002-05-17 Thread Yong Xu
Hi there, In Jeffrey Richter's recent book, Applied .NET Framework programming, Page 156, he demonstrated how to implement Equals for a reference type whose base class overrides Object's Equals. He wrote this, // let the base type compare its fields if (!base.Equals(obj)) return false; ... // If t