Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

init dictionary c#

var myDict = new Dictionary<string, string>
{
    { "key1", "value1" },
    { "key2", "value2" }
};
Comment

init dictionary c#

Dictionary<int,string> dict = new Dictionary<int, string>();
dict.Add(1, "Mohan");
dict.Add(2, "Kishor");
dict.Add(3, "Pankaj");
dict.Add(4, "Jeetu");
Comment

init dictionary c#


static class Program
{
    static void Main(string[] args)
    {
        var myDict = new Dictionary<string, string>
        {
            { "key1", "value1" },
            { "key2", "value2" }
        };

        Console.ReadKey();
    }
}

Comment

PREVIOUS NEXT
Code Example
Csharp :: exit application wpf 
Csharp :: c# messagebox 
Csharp :: c# convert string to double 
Csharp :: serilog loglevel order 
Csharp :: c# remove all null from list 
Csharp :: windows form rounded corners 
Csharp :: unity get current scene 
Csharp :: string to enum c# 
Csharp :: bin/bash bad interpreter 
Csharp :: instantiate an object at a certain position unity 
Csharp :: c# try catch with error message 
Csharp :: c# date formats custom 
Csharp :: wpf choose file dialog 
Csharp :: c# get object property value by name 
Csharp :: remap float c# 
Csharp :: c# format string with 2 decimals 
Csharp :: how to chnage the Scale propery of rect tranform unity 
Csharp :: even number checker in c# 
Csharp :: how to check if list index is out of range in c# 
Csharp :: unity if or 
Csharp :: dyncmics 365 setstate request 
Csharp :: unity destroy object on collision 
Csharp :: application server types in .net 
Csharp :: unity list to array 
Csharp :: check internet connection in c# 
Csharp :: c# unity 2d play video 
Csharp :: How can I cast string to enum? 
Csharp :: c# string newline 
Csharp :: c# reverse a string 
Csharp :: if cluse in class in vue 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =