public Dictionary<Command,Container> GetCommands() { return _commands; } privateDictionary<Command, Container> _commands;
public Dictionary<Command,Container> GetCommands() { return _commands; } privateDictionary<Command, Container> _commands;
i wanna block Add operations outside class var m = c.getCommands(); m.Add(...
I searched google and stackoverflow but I couldn't find exactly I wanted, then when I asked chatgpt got anwswer that I should use IReadOnlyDictionary<T>. Is this the best practice?