logo CodeStepByStep logo

UniqueNames

Language/Type: C# collections List
Related Links:

Write a console program named UniqueNames that asks the user for a list of names (one per line) until the user enters a blank line (i.e., just presses Enter when asked for a name). At that point the program should print out the list of names entered, where each name is listed only once (i.e., uniquely) no matter how many times the user entered the name in the program. For example, your program should behave as follows:

Enter name: Alice
Enter name: Bob
Enter name: Alice
Enter name: Alice
Enter name: Alice
Enter name: Bob
Unique name list contains: Alice Bob
Class: Write a complete C# class.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.