In this article, We will discuss How to Use Dictionary Initializer in C# 6.0.
Dictionary Initializer is a new concept in C# 6.0 where Microsoft removed the Object {key,value} pair and directly we can assign values by the “=” operator.
Dictionary Initializer is a new concept in C# 6.0 where Microsoft removed the Object {key,value} pair and directly we can assign values by the “=” operator.
For Example:
Dictionary<string, string> dicStr = new Dictionary<string, string>()
{
["Max"]="Texas"
};
0 comments:
Post a Comment