1. Collection Introduction: a class System. Collections. ArrayList in the System. Collections namespace also implements IList, ICollection, and IEnumerable. This class can be used to represent a list of items with variable sizes. My understanding: ArrayList can be an image that represents a variable Array, while Array that represents an immutable Array. For example, this is array [csharp] Animal [] animalArray = new ANimal [2]; Cow myCowl = new Cow ("xiaoyuan"); animalArray [0] = myCowl; animalArray [1] = new Chicken ("ken"); [csharp] <p> foreach (Animal myAnimal in animalArray) </p> <p >{</p> <p> Consale. writeLine ("New {0} object added to Array collection," + "Name = {1}", myAnimal. toString (), myAnimal. name); </p> <p >}</p> the following example: ArrayList [csharp] ArrayList animalArrayList = new ArrayList (); Cow myCow2 = new Cow ("Hayley"); animalArrayList. add (myCow2); [csharp] animalArrayList. removeAt (1); Understanding collections and arrays can be better understood than variable arrays and arrays in objective-c. 2. Comparison is Operator: Operation Syntax: <operand> is <type> determines whether an object belongs to a certain type. IComparable and IComparer interfaces IComparable: You can compare this object and another object in the object class to be compared. IComparer: Implemented in a separate class. You can compare any two objects. Generally, we use IComparable to give the default comparison code of the class, and use non-default comparison Code provided by other classes. IComparable provides the CompareTo () method (). This method accepts an object, so it can be implemented to send the Person object to him, indicating whether the Person is younger or older than the current Person. This method returns an int. if (person1.ComparteTo (person2) [this method can be directly implemented in the class] {} ICompare provides a Compare (), and can accept two objects if (personCompare. compare (person1, person2) = 0 ){.....} 3. The conversion can be implicitly converted. This can be analogous to the objective-C as operator using the following syntax to convert a type to a specified reference type: <operand> as <type>: the <operand> type is <type> type <operand> can be implicitly converted to <type> type <operand> can be boxed to the type <type> if it cannot be converted from <operand> <type>, the expression returns null. for example: ClassA obj1 = new ClassA (); ClassD obj2 = obj1 as ClassD;