Join Gerry O'Brien for an in-depth discussion in this video Solution: Create an object and store string values in it, part of Learning C#.
In this challenge, you were asked to…create a sorted list from the generics collection.…So in other words, we wanted you to create a…generic sorted list object and store some strings in it.…Now by default, with a C Sharp console application,…Microsoft already includes the using…directive for the System.Collections.Generic namespace.…This means you don't have to…import System.Collections.Generic, it's already there for you.…So here's the way I would write this is step into my…main method within the body, and I'm going to make use of IntelliSense.…
And as I start typing Sort, we can see that Visual Studio pops up the…list of classes that it knows with all of the imported name spaces start with Sor.…I find sorted lists, and I can press the tab…key for auto completion, and it now enters the full SortedList.…And again, we mention that this is going to be…a generic list, so we want to store string values.…Generic SortedLists, requests or use a key to help us locate the key that we store.…In order to create this, we need to store a key and we need to store a value.…
- Installing C#
- Working with loops
- Controlling program flow
- Using variables
- Building functions
- Creating and instantiating classes
- Catching errors
- Managing resources with the garbage collector
- Building collections
Skill Level Beginner
1. Introducing C#
2. C# Language Elements
3. Object-Oriented Programming in C#
4. Structured Exception Handling
5. Resource Management in C#
6. Extensible Types in C#
7. Windows Apps in C#
- 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.