473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

member in collection

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'?
Nov 17 '05 #1
1 1223
Zest4Csharp wrote:
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
Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: DelGator | last post by:
Foundation...Accessing derived class members through a variable of their base class is just a matter of casting the variable to the derived class. How would you access the derived class members...
1
by: Tim | last post by:
Hi, I'm very new to .NET and am programming in C#. I have a web application where i have two list boxes. Its kind of like a shopping card where you can add items from one 'locations' list box to...
2
by: Crirus | last post by:
I have some question related to the other post about iteration on a class members. I had found a way to figure out when a member of my class is array so I can pull out it's elements to iterate...
3
by: Dave | last post by:
Greetings All, I have never seen this error before, and after an extensive search of Groups, I cannot find a satisfactory answer to my basic question. What exactly does "is not a member of...
1
by: tshad | last post by:
I have a collection class(exChain), for my Exception log which is getting the following error: *************************************************************************** No default member found...
4
by: PengYu.UT | last post by:
I have the following program. The auto_ptr cause the compile error. When I change auto_ptr to pointer, the error gone. Would you please help me to understand what is wrong? ...
5
by: rn5a | last post by:
I have a user control page named MyUC.ascx which has a Panel control This Panel, in turn, has a TextBox. Next I use this user control in an ASPX page named MyPage.aspx by registering the user...
5
by: Tim Frink | last post by:
Hi, I'm experimenting with function pointers and found two questions. Let's assume this code: 1 #include <iostream> 2 class A; 3 4 //////////////////////////////////////////// 5 class B
4
by: danmath06 | last post by:
If I have an Object and a string wich is the name of a member of the object, how can I access the member. I'm trying to do something similar to the DisplayMember property the ListBox has. I'm...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.