Questions tagged [stringdictionary]

StringDictionary is a hash table where both the key and value strongly typed to be strings rather than objects.

StringDictionary is a hash table where both the key and value strongly typed to be strings rather than objects.

References

10 questions
81
votes
7 answers

StringDictionary vs Dictionary

Does anyone have any idea what the practical differences are between the System.Collections.Specialized.StringDictionary object and System.Collections.Generic.Dictionary? I've used them both in the past without much thought as to which would perform…
Scott Ivey
  • 40,768
  • 21
  • 80
  • 118
2
votes
4 answers

StringDictionary as a common static list?

what I'm trying to do is have a project-wise static dictionary so I can access a single list from anywhere in my code. Until now, I came up with this solution, a public static class with a public property: public static class Common { public…
Albireo
  • 10,977
  • 13
  • 62
  • 96
2
votes
1 answer

VB.NET Property as StringDictionary?

I'm trying to create a new property with a type of StringDictionary but when I use the property like a stringdictionary variable I am getting an error. The goal is to NOT use a variable, I need to use a property for this. Behind the scenes I am…
Mister Smith
  • 55
  • 1
  • 3
2
votes
4 answers

In C# .NET, is there a reason for no copy constructor for StringDictionary?

I apologize if this is a dumb question, but hear me out: Dictionary genericDict = new Dictionary; genericDict.Add("blah", "bloop"); // Use the copy constructor to create a copy of this dictionary return new…
Pandincus
  • 9,506
  • 9
  • 43
  • 61
1
vote
3 answers

How do you store and retrieve a StringDictionary in app.config?

I have a list of information in a string dictionary that I want to store in the app.config for my program. I've created the entry in the "settings" portion of the program called "extentions" but when I go to use "Settings.Default.Extentions" I get…
Crash893
  • 11,428
  • 21
  • 88
  • 123
1
vote
2 answers

How to convert StringCollection to BindingList

Is it possible to convert a StringCollection variable to a BindingList, and then back? I am trying to bind a StringCollection to a DataGridView, and I am struggling to make it work. I want to do the same thing with a StringDictionary. Do I need to…
rogdawg
  • 687
  • 3
  • 11
  • 33
1
vote
1 answer

Saving Dictionary into My.Settings doesn't work

I am trying to save Dictionary(Of String, String) into My.Settings. It seems, that those settings only support System.Collection.Speciallized.StringDictionary, which is not exactly the same thing, but would be OK. I create a StringDictionary, fill…
Oak_3260548
  • 1,882
  • 3
  • 23
  • 41
0
votes
2 answers

Application setting is not saved

I want to save a StringDictionary into the Application Settings in order to fill my listbox lbc_lastCustomersVisited with saved values at application launch. Here is my application setting (XML format) :
Hellcat8
  • 538
  • 2
  • 5
  • 17
0
votes
1 answer

listbox bound to a Specialized.StringDictionary does not update

I've got a listbox (listStorageLocations) - thats bound to a BindingSource called listStorageLocationsBindingSource. This BindingSource is bound to a collection of StringDictionary items in my Settings.Default.StorageLocations. The listbox's…
Jack
  • 9,156
  • 4
  • 50
  • 75
0
votes
1 answer

How to initialize StringDictionary in my project settings

I've added a StringDictionary to my project settings in VS2010. When I try to add members to it in my program, I get a NullReferenceException. When I try to initialize a value in its Value column in my project settings, it says my entry cannot be…
user2320861
  • 1,391
  • 2
  • 11
  • 28