473,480 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

retrieve key from collection

Hello,

can anyone tell me how i retrieve the key(which i included by adding
elements) from an item in the collection?

Thanks,

Albert
Jun 19 '06 #1
4 1443
If the item you are collecting has a way of storing the key, then you
have it. Otherwise, I've searched all over the collection object - it
isn't there.
The other option you have is to subclass your own collection object and
build in the functionality yourself.

T

Albert wrote:
Hello,

can anyone tell me how i retrieve the key(which i included by adding
elements) from an item in the collection?

Thanks,

Albert

Jun 19 '06 #2
On Mon, 19 Jun 2006 14:53:26 +0200, "Albert" <al****@informant.nl>
wrote:
Hello,

can anyone tell me how i retrieve the key(which i included by adding
elements) from an item in the collection?

Thanks,

Albert


The general collection class does not really offer that funtionality.
If you need to work with both key and item, you likely would want to
use one of the specialized collections. Which one depends on what you
are wanting to accomplish.

Gene
Jun 19 '06 #3
Albert,

Can you clarify which collection class you're using?

Brian

Albert wrote:
Hello,

can anyone tell me how i retrieve the key(which i included by adding
elements) from an item in the collection?

Thanks,

Albert


Jun 19 '06 #4
If you use Generic.Sorted list or like, do it:

Dim strKey As String = colCollection.Keys(Index).ToString

[]s
Cesar
"Albert" <al****@informant.nl> wrote in message
news:44**********************@text.nova.planet.nl. ..
Hello,

can anyone tell me how i retrieve the key(which i included by adding
elements) from an item in the collection?

Thanks,

Albert

Jun 20 '06 #5

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

Similar topics

2
5223
by: Ersin Inan | last post by:
Hi All, Is there a way to get page name in asp.net code behind? I use this to log error messages in DB ( and in which page the error occured ) For instance , if it is welcome.aspx , then in C#...
0
1060
by: balamurukan | last post by:
hai, i my own collection in properties window.after cliking browse button it will show one collection editor which has 3 properties contains values(Like datagridColumnstyle collection).I wanto to...
0
1658
by: george_Martinho | last post by:
It seems that the ASP.NET Microsoft team didn't think about this!! The profilemanager class has the following methods: - DeleteInactiveProfiles. Enables you to delete all profiles older than a...
1
19306
by: ykong1214 | last post by:
In my project, there is a single select tag, <html:select property="userName" size="7"> <html:options collection="UserList" property="value" labelProperty="label" /> </html:select> ...
2
1458
by: BSamp | last post by:
I have the following business entity classes shown below. I have a data layer that retrieves the data from the database and populates a new instance of the PendingRecord class then adds it to the...
3
3415
by: JimCinLA | last post by:
I use a place holder to load different user controls on an .aspx page. Let's call this default.aspx. Each user controls contains about a dozen different ASP.Net controls. My question is, how...
4
1578
by: Jeff | last post by:
hey ASP.NET 2.0 I'm preparing for a certification exam on asp.net 2.0 and yesterday I took a skill assessment test on microsoft.com. One of the questions was about creating cookies. This was...
6
3855
by: ashok.dhananjeyan | last post by:
Hi, Actually , I wrote one javascript to retrieve the name of the form in one particular page. what i did in this page is, <script> function checkbutton() {
5
25511
by: Ken | last post by:
I'm trying to run a loop to capture column property information from a table in my datasource. Can anybody see where this is going wrong? Dim tbl As New DataTable Dim col As DataColumn Dim x...
0
7054
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6918
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7057
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7102
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5357
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4495
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3008
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3000
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1310
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.