Hash from array

A

Andreas Håkansson

Hi,

I have an array of objects, lets say they are of type MyObject, which I
would
like to calculate a unique hash for. The object looks something like this

class MyObject
{
public string a;
public string b;
public string c;
public string d;

// And a few other public fields
}

What I would like to do it calculate a combined hash for all the MyObject
objects
in the array, based on the a, b, c and d fields. Suggestions on how to do
this with
a good hash implementation? I guess XOR-ing the fields together and then XOR
the results from each object wouldnt be the best of ways.

/Andreas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top