member in collection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

is there a function in C# that will indicate if an object is member of a
collection (such as an ADO Column object in a Columns collection) without
having to loop through the collection with a 'foreach'?
 
Zest4Csharp said:
is there a function in C# that will indicate if an object is member of a
collection (such as an ADO Column object in a Columns collection) without
having to loop through the collection with a 'foreach'?
There is IList.IndexOf and IList.Contains.

If by Column Collection you mean a DataColumnCollection then yes it
appears that it implements a Contains method which will search for a
column by name.


Cheers
JB
 
Back
Top