Comparing 2 arrays, what's the fastest way ?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Mike (Mike_at_discussions.microsoft.com)
Date: 11/10/04


Date: Tue, 9 Nov 2004 16:29:09 -0800

Hi! I am trying to determine if the DataRow of one dataset contains the same
data as the DataRow of another. I figured I can extract ItemArray's from each
dataset and then compare them.

1) Is this the fastest way? I will have to loop through thousands of rows
for what I am doing.

2) How can I compare arrays for Value Equality ? I do not think array's
.Equal method does Value Equality check. Based on what I understood, it does
Reference Equality check. Am I right ?

Any input is greatly appreciated,



Relevant Pages

  • Re: How to retrieve multi-row blocks from a datatable?
    ... your example line for the daily data.. ... You can extract a block of rows from ... the table using criteria such as you have listed with an expression like: ... Dim Dailyas DataRow ...
    (microsoft.public.dotnet.languages.vb)
  • How to copy datarow from one datatable to another ?
    ... how to copy one datarow from one datatable to another.. ... I want to extract some specific rows from one datatable and put into antoher ... "This row already belongs to another table" ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: DataRow object
    ... Assume that your DataRow is named dro. ... > How do I extract values from columns that are in a DataRow object? ...
    (microsoft.public.dotnet.framework.adonet)
  • extracting integers from datarows
    ... I have an integer value inside a datarow. ... Is there a more graceful way ... to extract it than this: ... Is there a way around the conversion? ...
    (microsoft.public.dotnet.languages.csharp)