This video explains the new pattern-matching features that are available in Visual Studio 2017 with C# 7.
- [Narrator] For a long time we have been able to…check to see if a particular variable reference is of…a certain type using the is operator.…With C sharp seven, there have been several enhancements to…this to allow what is known as pattern matching.…So if I scroll down to the Query Max Speed method,…here we have a method that uses the is operator on…a parameter passed in as an object.…There's an if else structure, as each branch of…the if structure is encountered, we cast the…parameter into the matched type.…C sharp seven is going to allow us to…improve this immediately by initializing the type…right on the if statement.…
So instead of defining a variable car,…I can get rid of that and I can say…variable is car and then put the word car afterwards.…And that will define it right there in line.…I'll do the same to the other items inside…the if statement as well.…All right, I'll change that to year…(keyboard clicking)…and this one to make.…(keyboard clicking)…We can continue to simplify the method.…Instead of using the if else structure…
- Working with tuples
- Using C# throw expressions
- Inspecting UI structures with Xamarin Inspector
- Identifying memory leaks in iOS and Android
- Recording and playing back tests with Test Record
- Using embedded assemblies in Android
Skill Level Intermediate
1. C# 7 Language Improvements
Inspecting UI structures3m 34s
4. Test Recorder
5. Embedded Assemblies
Where to go from here1m 54s
- 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.