My .NET application works with collection of users. A User object contain the username, the fullname, the domain....
I wonder which type of collection should I prefer to store the users, between a 1) List or 2) Dictionary, where the dictionary key is the username.
I understand that the dictionary option is fastest when having to retrieve a user from its username, but because the username is referenced twice consistency error might occurs. (as dictionary key and as user attribute)? Could you also explain me what are the differences from a design point of view?