471,072 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Generic SortedList question

This is where a different thread ended.
The subject of this query is quite different from that of the other thread
so I thought I should start a new thread.

I'm using
Private mItemList As SortedList(Of String, StringWithInteger)

To populate a generic CombBox

StringWithInteger has two properties Str and Value

I need to get the Value property of the StringWithInteger part of the
selected item

The selected item should have the same type as the SortedList items (I
guess)

I got this far
= DirectCast(ComboBox1.SelectedItem, SortedList(Of String,
StringWithInteger)).Value
I don't think I want to cast to SortedList but something like
SortedList.Item

I noted the term KeyValuePair(of String, StringWithInteger)
but don't know how to use it

Thanks for any help
Feb 20 '07 #1
2 1230
I posted an answer in the previous thread.

Robin S.
-----------------------
" active" <ac**********@a-znet.comwrote in message
news:uQ**************@TK2MSFTNGP06.phx.gbl...
This is where a different thread ended.
The subject of this query is quite different from that of the other
thread so I thought I should start a new thread.

I'm using
Private mItemList As SortedList(Of String, StringWithInteger)

To populate a generic CombBox

StringWithInteger has two properties Str and Value

I need to get the Value property of the StringWithInteger part of the
selected item

The selected item should have the same type as the SortedList items (I
guess)

I got this far
= DirectCast(ComboBox1.SelectedItem, SortedList(Of String,
StringWithInteger)).Value
I don't think I want to cast to SortedList but something like
SortedList.Item

I noted the term KeyValuePair(of String, StringWithInteger)
but don't know how to use it

Thanks for any help


Feb 20 '07 #2
I figured this was really a different subject
Thanks
"RobinS" <Ro****@NoSpam.yah.nonewrote in message
news:gb******************************@comcast.com. ..
>I posted an answer in the previous thread.

Robin S.
-----------------------
" active" <ac**********@a-znet.comwrote in message
news:uQ**************@TK2MSFTNGP06.phx.gbl...
>This is where a different thread ended.
The subject of this query is quite different from that of the other
thread so I thought I should start a new thread.

I'm using
Private mItemList As SortedList(Of String, StringWithInteger)

To populate a generic CombBox

StringWithInteger has two properties Str and Value

I need to get the Value property of the StringWithInteger part of the
selected item

The selected item should have the same type as the SortedList items (I
guess)

I got this far
= DirectCast(ComboBox1.SelectedItem, SortedList(Of String,
StringWithInteger)).Value
I don't think I want to cast to SortedList but something like
SortedList.Item

I noted the term KeyValuePair(of String, StringWithInteger)
but don't know how to use it

Thanks for any help



Feb 21 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by newscorrespondent | last post: by
2 posts views Thread by Prez | last post: by
2 posts views Thread by Bruce Arnold | last post: by
4 posts views Thread by Oscar Thornell | last post: by
1 post views Thread by Ethan Strauss | last post: by

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.