473,326 Members | 2,126 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,326 software developers and data experts.

about StringDictionary

Hi,

How can I grab to a specific element value into a string dicitionary ?
Let's say we have an string dictionary which is full and on a specific row
want to grab one of the item.
I found "ContainsKey" method but when I write (within a foreach loop):

if (myStringDicArray.ContainsKey("ControlID"))

it's just returns true or false! I need to return the value in that specific
element.

Thanks in advance
Nov 16 '05 #1
1 1907
C# newbie <it**************@yahoo.com> wrote:
How can I grab to a specific element value into a string dicitionary ?
Let's say we have an string dictionary which is full and on a specific row
want to grab one of the item.
I found "ContainsKey" method but when I write (within a foreach loop):

if (myStringDicArray.ContainsKey("ControlID"))

it's just returns true or false! I need to return the value in that specific
element.


Same as with Hashtable:

string value = myStringDicArray["ControlID"];

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #2

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

Similar topics

1
by: eScrewDotCom | last post by:
eScrew Welcome to eScrew! eScrew is eScrew and this is eScrew story. eScrew will tell you eScrew story if you promise eScrew to consider eScrew story as joke. eScrew story is very funny. eScrew...
220
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
8
by: eScrewDotCom | last post by:
eScrew Welcome to eScrew! eScrew is eScrew and this is eScrew story. eScrew will tell you eScrew story if you promise eScrew to consider eScrew story as joke. eScrew story is very funny. eScrew...
6
by: John | last post by:
Hi! I have a StringDictionary itialized as follows: private void frmICUCalculations_Activated(object sender, System.EventArgs e) { StringDictionary dataDict = new StringDictionary();...
4
by: Sanjay Vyas | last post by:
Sorry, forgot to cross post this one.. This is rather unusual as we would expect any Collection class to implement ICollection interface and furthermore a Dictionary class should implement...
1
by: Srikanth | last post by:
Hi, I have a StringDictionary object with Key and Value pairs. I have a situation where 1. I have to retrieve the Value for a given Key and 2. I have to retrieve the Key for a given Value. ...
2
by: rajmgopal | last post by:
Hi I am using a StringDictionary to store and pass a few string values retrieved from sql server database. I am using these values as inputs to several stored procedures After processing a few...
0
by: Simon Dahlbacka | last post by:
I was trying to use the built in settings management and added a User-scoped setting of type System.Collections.Specialized.StringDictionary I run my application, updated the Settings, did...
0
by: Hans | last post by:
Hello, I was trying to use the built in settings management and added a User-scoped setting of type System.Collections.Specialized.StringDictionary I run my application, updated the...
4
by: Peter K | last post by:
Hi are there any benefits in using StringDictionary over Dictionary<string, string? It appears they achieve the same thing... (I could be wrong of course). thanks, Peter
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...
1
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...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.