I'm not just new to this forum, but I'm also very new to programming and C#... so be warned! I am using a dictionary list to hold my usernames for an application I'm making. It's never actually going to be used, but it's purely to develop my knowledge. Firstly, am I correct in using this to initiate(?) my list?
Dictionary<string, User> users= new Dictionary<string, User>();
As far as I know this creates a list, with items stored with 2 elements; their key, and the object (which can contain lots more data, created using the class User).
So as far as I'm aware, I then need to create the object:
User joebloggs = new User(username, name, password, age);
and then add this to the list:
Is this the correct way of doing things? I am also having difficulty when using lists in a GUI (with a form). Where abouts should I be declaring the list, in the static void Main(), or in the Form.cs itself?
Apologies if my terminology is a little off, please don't hesitate to correct me! Thank you in advance for any help you can provide :)