idictionary

IXmlSerializable Dictionary problem

I was trying to create a generic Dictionary that implements IXmlSerializable (credit to Charles Feduke). Here is my trial: Sub Main() Dim z As New SerializableDictionary(Of String, String) z.Add("asdf", "asd") Console.WriteLine(z.Serialize) End Sub Result: <?xml version="1.0" encoding="utf-16"?><Entry key="asdf" value="a...

ASP.Net MVC 2 - ModelBinding and Dictionary<int, int>

Hi, In my interface I have a list of text boxes, something like this : http://screencast.com/t/YjIxNjUyNmU The number of textboxes is unknown as each of them is associated with a Template. In my page, the goal is to associate a number to some of those templates. Here is a sample HTML code : <% // loop on the templates foreach(IT...

Why does not IDictionary (non-generic) inherit from IEnumerable<DictionaryEntry>?

IDictionary<TKey, TValue> inherits from IEnumerable<KeyValuePair<TKey, TValue>>, but IDictionary for some reason doesn't inherit from IEnumerable<DictionaryEntry>. I wonder why? I hate to write this ugly .OfType<DictionaryEntry>() every time when I need to make a query against an IDictionary. ...

Is there a limit to entries in a Dictionary<> ?

I have about 3000 different files I need to organize, and retrieve at different times during the game. I created my own struct of variables. I was thinking about creating a "Dictionary " at the beginning of my application, and simply loading all my files before the game starts. I'm wondering about performance: will a dictionary with ...

Convert List of KeyValuePair into IDictionary "C#"

My seenario, how to convert List<KeyValuePair<string, string>> into IDictionary<string, string> ...