C# ArrayList Equals(Object)
Description
ArrayList Equals(Object)
determines whether the specified
object is equal to the current object.
Syntax
ArrayList.Equals(Object)
has the following syntax.
public virtual bool Equals(
Object obj
)
Parameters
ArrayList.Equals(Object)
has the following parameters.
obj
- The object to compare with the current object.
Returns
ArrayList.Equals(Object)
method returns true if the specified object is equal to the current object; otherwise, false.
Example
using System;//from ww w.j av a 2 s. c o m
using System.Collections;
class MainClass
{
static void Main(string[] args)
{
ArrayList a = new ArrayList(10);
int x = 0;
a.Add( ++x);
a.Add( ++x);
a.Add( ++x);
a.Add( ++x);
ArrayList b = new ArrayList(10);
Console.WriteLine(a.Equals(b));
}
}
The code above generates the following result.