System.Collections.ArrayList.IndexOf C# (CSharp) Method

IndexOf() public method

public IndexOf ( Object value ) : int
value Object
return int
        public virtual int IndexOf(Object value)
        {
            Contract.Ensures(Contract.Result<int>() < Count);
            return Array.IndexOf((Array)_items, value, 0, _size);
        }

Same methods

ArrayList::IndexOf ( Object value, int startIndex ) : int
ArrayList::IndexOf ( Object value, int startIndex, int count ) : int

Usage Example

Example #1
0
        public static ArrayList generaCamposRelacion(ArrayList tabSelec, ArrayList alias, ArrayList camposRel)
        {
            ArrayList resp = new ArrayList();
            if (camposRel != null)
            {
                foreach (ArrayList regCam in camposRel)
                {
                    string nombreTabB = (string)regCam[2];
                    string nombreTabR = (string)regCam[3];

                    string nombreCampoTB = (string)regCam[4];
                    string nombreCampoTR = (string)regCam[5];

                    int indexTB = tabSelec.IndexOf(nombreTabB);
                    int indexTR = tabSelec.IndexOf(nombreTabR);

                    string aliasTB = (string)alias[indexTB];
                    string aliasTR = (string)alias[indexTR];

                    resp.Add(aliasTB + "." + nombreCampoTB + " = " + aliasTR + "." + nombreCampoTR);

                }
            }

            return resp;
        }
All Usage Examples Of System.Collections.ArrayList::IndexOf