Join Bruce Van Horn for an in-depth discussion in this video Unordered data and dictionaries, part of C# Essential Training: 2 Flow Control, Arrays, and Exception Handling.
- [Instructor] The last collection type…I want to show you in C# is a dictionary.…So far we have seen the use of lists…and arrays and in those cases,…we were able to create, for example,…a list and this case we'll make a new list of strings.…We would add things to that.…
I'll say C# is awesome, and then…we would get that value back based…on its position, so in this case…it would test list zero, because…it's the first thing in the list,…but what if you could do this without…dealing with the numerical index?…Wouldn't it be cooler if you had…some way of making a list that allowed…you to use a key value pair situation…so you could, instead of a number,…assign some meaningful string here?…That is effectively what a dictionary is.…
An example of a dictionary might look like this.…To really drive the point home,…I think I'll actually create something…that looks exactly like a dictionary.…Why don't I create a variable called dictionaryWords…and I'll set it equal to a new dictionary.…We can see our diamond there, just like…
AuthorBruce Van Horn
- Writing unit tests in C#
- Working with simple and multidimensional arrays
- Managing ordered and unordered data with lists
- Evaluating conditions with if-else statements
- Using OR, AND, and NOT operators
- Building loops
- Debugging and handling exceptions
- Creating the final build of your C# project
Skill Level Beginner
C# Object-Oriented Programming Tips and Trickswith Jesse Freeman58m 39s Intermediate
1. Unit Testing and Test-Driven Development
2. Arrays and Collections
3. Flow Control
4. Exception Handling
5. Getting to Production
Next steps1m 57s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.