about StringDictionary

  • Thread starter Thread starter C# newbie
  • Start date Start date
C

C# newbie

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
 
C# newbie said:
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"];
 
Back
Top