L
L
Ledington2021-11-26 08:58:56
Command line
Ledington, 2021-11-26 08:58:56

How to create an array from int and string into an array?

Tell me how to create an array from int and string, which allows you to operate with int values ​​as keys and strings as values?
Everywhere an example with one of the values ​​is described, for example:
var array = mass[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
And here an array is pre-created, and I need to create a void Add(int key, string value) method and add variables to it.
Or tell me, please, what can I read about this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rPman, 2021-11-26
@Ledington

Dictionary<int,string>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question