O'Reilly logo

C# Data Structures and Algorithms by Marcin Jamro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Example – user details

The second example will show you how to store more complex data in the dictionary. In this scenario, you will create an application that shows details of a user based on him or her identifier, as shown in the following diagram:

The program should start with the data of three users. You should be able to enter the identifier and see details of the found user. Of course, the situation of non-existence of a given user should be handled by presenting the proper information in the console.

At the beginning, let's add the Employee class that just stores the data of an employee, namely first name, last name, and phone number. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required