+ 1

How to create a dictionary with 2 values?

I want to create a dictionary with a string key and a class that contains 2 int values. https://code.sololearn.com/cCL1M6S43cT8/?ref=app

8th Oct 2021, 12:31 AM
Zachary Carter
1 ответ
+ 2
You can create a dictionary. It has key/value pairs. Dictionary<string, int> d = new Dictionary<string, int>(); your Value class is also an issue in your code. Review C# Lesson 79.1 and the lessons on classes. A tuple could be a solution or a custom object.
8th Oct 2021, 1:06 AM
Paul K Sadler
Paul K Sadler - avatar