using System.Collections.Generic; namespace Game { public class Config { private Dictionary dictionary = new Dictionary(); public Config() { } public string this[string key] { get => dictionary[key]; set => dictionary[key] = value; } public string[] GetLines() { string[] lines = new string[dictionary.Count]; int lineIndex = 0; foreach (var kvp in dictionary) { lines[lineIndex] = $"{kvp.Key} {kvp.Value}"; lineIndex++; } return lines; } } }