Answers for "fill dictionary c#"

C#
18

c# initialize dictionary

Dictionary<int, string> dictNew = new Dictionary<int,string>()
{
  {1, "true"},
  {2, "false"}
}
Posted by: Guest on May-07-2020
0

fill dictionary c#

var students = new Dictionary<int, StudentName>()
{
    { 111, new StudentName {FirstName="Sachin", LastName="Karnik", ID=211}},
    { 112, new StudentName {FirstName="Dina", LastName="Salimzianova", ID=317}},
    { 113, new StudentName {FirstName="Andy", LastName="Ruth", ID=198}}
};
Posted by: Guest on January-22-2021

C# Answers by Framework

Browse Popular Code Answers by Language