Join Reynald Adolphe for an in-depth discussion in this video Understanding order of operation with static and instance methods, part of C# 6.0 First Look.
- Another aspect of this new using clause…I'd like to demonstrate is its order of operation…when calling instance versus static methods.…Let's go ahead to our Writer class,…and I'd like to point out a couple of things.…At the very top of the class,…you'll notice that I have the using static clause,…and import the System.Console name space.…Then, you'll notice that I have written a WriteLine method,…and it's typed exactly the same way…as the WriteLine method within the Console class.…
So, my question to you is…when we run this, what will run?…Will it be the WriteLine method that I've written,…or will the WriteLine method within the Console class…be invoked when we actually call our StartTest class?…Let's go ahead and invoke the Writer class,…and then discuss the compiler's decision.…First, I'd like to go ahead and…create an instance of Writer.…
And then, let's go ahead…call the StartTest method and say,…Everyone loves to laugh.…Except bozos.…Okay?…Now let's go ahead and run it.…And again, the question is,…will it call this method that I've written,…
- Introducing the new IDE in Visual Studio 2015
- Leveraging nameof expressions
- Using index initializers
- Using await in catch and finally blocks
- Using static
- Resolving conflict instance methods
Skill Level Beginner
1. Touring the Enhanced IDE
2. Expression-Level Features
3. Statement-Level Features
Adding exception filters2m 42s
4. Member Declaration and Initialization Features
5. Improved Debugging
- 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.