R
R
Rasse2020-12-19 16:35:39
C++ / C#
Rasse, 2020-12-19 16:35:39

Analogue of php arrays in c#?

You need to create an array - with something like this structure:

$array = array(
    "val1"=>array(
      "set1" => array (
          35,
          30,          
          39
      ),
    ),
);

What is the correct way to do this with a Dictionary?

UPD

for memory to novice descendants)
public static Dictionary<string, Dictionary<string, string>> Action = new Dictionary<string, Dictionary<string, string>>
        {
            ["val1"] = new Dictionary<string, string>
            {
                ["set1"] =  "2"
            }
        };

Thank you)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
Johnny Gat, 2020-12-19
@Rasse

https://stackoverflow.com/questions/41029249/dicti...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question