Wednesday, October 7, 2009

Function to test whether 2 array of objects are equal or not.

public static bool AreEqual(object[] o1, object[] o2)
{
if (o1 == null && o2 == null)
{
return true;
}
if (o1 == null || o2 == null)
{
return false;
}

if (o1.Length == o2.Length)
{
int i;
bool eq = true;
for (i = 0; i
{
if (AreNotEqual(o1[i], o2[i]))
{
return false;
}
}

return eq;
}

return false;
}

No comments:

Node.JS rest api Tutorials