Wording in my previous question prevented people from answering it. Regardless to say, I can do what I need to do. My ultimate concern is which option is optimal?
I am traversing the entire Active Directory for the domain and filtering it down by people/users.
I then need to throw this information into a collection.
I know I can do it with
List<Users> // Create a model with the information i need and populate it.
Dictionary<string, List<Users>> // add a list of users to the string/department
Dictionary<string, Users> // struct or class
Lookup<string, Users>
I'm more looking for the optimal way, as going the Active Directory can be slow by it self I'm looking to optimize my code in other areas.
I only need the department stored a single time, and each department can have many different users.
What is the most optimal method to choose in this instance?
Edit Addition:
The only reason I need this specific code is for a specific page which will eventually allow me to loop through the contents and build out a drop down list. This code will not be used any where else.