I currently have this code to access the value of the dictionary, but it looks like a code smell. French and english words, phrases and idioms: I have an api that returns a dictionary of dictionaries.
For instance, the.tostring() is completely superfluous, since you're working with a dictionary<string,string>. It is always going to return a. I really don't see the point of your original code, btw.
I have a dictionary<string,string> and want to flatten it out with this pattern: Also without seeing the actual dictionary, it's hard to come up with a viable review. No other languages allowed here. Sure you get a nullreferenceexception but is this the type of exception one.
It will ask who's birthday it is that you're looking for. Then if it is in the dictionary, it will print back what that birthday is. Dictionary<string, int> dict = null; Mots, expressions et tournures idiomatiques en français et en.
I will also note that i started out with hand coding the trygetvalue stuff, but this got unreadable pretty. To that end, here's a very small extension method class that a) uses idictionary rather than dictionary to develop to interfaces rather than implementations, b) adds generics. Is there a better way to.