Re: Array equality
From: Edward Diener (diener_no_spam_ok_at_ORsoftware.com)
Date: 02/17/05
- Next message: Ian Meakin: "Problem referencing other classes from ASP.NET code behind class"
- Previous message: Carlos J. Quintero [.NET MVP]: "Re: Adding function to Excel"
- In reply to: Jon Skeet [C# MVP]: "Re: Array equality"
- Next in thread: Jon Skeet [C# MVP]: "Re: Array equality"
- Reply: Jon Skeet [C# MVP]: "Re: Array equality"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 17 Feb 2005 09:40:40 -0500
"Jon Skeet [C# MVP]" <skeet@pobox.com> wrote in message
news:MPG.1c7e159ff852112498bd52@msnews.microsoft.com...
> Edward Diener <diener_no_spam_ok@ORsoftware.com> wrote:
>> Is there any System.Array function to test to see if two arrays are
>> equal, meaning the arrays are the same length and contain elements
>> which are equal to each other ? The System.Array.Equals method
>> appears to test only for instance equality, just like object.Equals.
>
> No, there isn't - but the good news is that it's pretty trivial to
> write your own utility method to do it.
Yes, I realize it is pretty trivial to do it. Perhaps I do not understand
the purpose of the overridden System.Object.Equals method but I would have
thought that this should test for object equality rather than instance
equality for derived classes, since one could always test for instance
equality by casting both references to a System.Object.
- Next message: Ian Meakin: "Problem referencing other classes from ASP.NET code behind class"
- Previous message: Carlos J. Quintero [.NET MVP]: "Re: Adding function to Excel"
- In reply to: Jon Skeet [C# MVP]: "Re: Array equality"
- Next in thread: Jon Skeet [C# MVP]: "Re: Array equality"
- Reply: Jon Skeet [C# MVP]: "Re: Array equality"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|