Tip Of The Day
What you Learned Today?
Thursday, May 5, 2011
Declare and Intiaize Dictionary in a single line
This is a way to initialize the Dictionary using
Collection intializers
,
specify one or more element intializers when you initialize a collection class that implements
IEnumerable
Dictionary
dic = new Dictionary
()
{
{"erer","er"},
{ "rrr","rr"}
};
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment