<teamonkey> that wouldn't work cause... well I m making a small mod that add a few functions for arrays (like append, insert or remove)... what I want to do is create a remove function that can have an array and the index of the object to remove as parameters, and a second version of remove that has the array and the object you want to remove... inside the second version I have to test if the passed object is "equal" to one of the objects in the array and if so remove it... I guess I'll have to stick with the remove object only if these are pointers to the very same object...
I think the only way you can do that is to use the Compare() method and make sure that every Object you place place in the array overrides that method. Either that or make sure it overloads the ToString() method.
If you don't know the type of either object you can't do a byte-by-byte comparison of the object because you don't know the size of the objects or what fields there are and how they line up.
Function compare(t1:Object, t2:Object) Print SizeOf(t1) Print SizeOf(t2) End Function
Will print 0 for each because the size of an Object is 0. You'd need to cast the Object to something else to find the right size and that relys on you knowing what type the object is beforehand.