using System.Collections.Generic;
public static void Main() {
var dicionario = new Dictionary<string, MyObject> {
["item1"] = new MyObject("item1", "valor1", 1, 1.1),
["item2"] = new MyObject("item2", "valor2", 2, 2.2),
["item3"] = new MyObject("item3", "valor3", 3, 3.3)
Console.WriteLine(dicionario["item2"].Value);
public string Name {get; set;}
public string Value {get; set;}
public int Prop1 {get; set;}
public double Prop2 {get; set;}
public MyObject (string name, string valueParam, int prop1, double prop2){