Join Gerry O'Brien for an in-depth discussion in this video Using namespaces, part of Learning C#.
Microsoft Visual Studio uses the concept of…namespaces as a logical container for our classes.…If you've been following along in the course…so far, you've noticed the name, namespace that…has actually been highlighted in blue throughout all…of the code modules that we've been working with.…Again, it's a logical container for the classes that exist within our application.…We use namespaces to organize classes so we can…create a hierarchical structure of where to find these classes.…We use namespaces to control the scope of the classes in large projects.…In other words, where we will gain access to a specific class.…
They can also be used to prevent duplicate class names…when we're using multiple vendors' codes in the same application.…C# provides a using directive which helps…us shorten our namespace.class.method typing in code.…So as an example, if we can see our using keywords…up here at the top using…System, System.Collections.Generic, System.Linq, System.Text et cetera.…These are examples of bringing in namespaces that we can use…
- 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.