This video shows how new capabilities for expression-bodied members can be used in C# 7.
- [Instructor] An expression-bodied member…is a simple syntax for an item…that has only a single line of code.…C sharp seven has more cases…where we can use this simplified syntax.…The cases include, constructors,…finalizers, getters, setters, and even indexers.…Let's take a look at how to use these.…I'm going to switch back over to the displacement view model…and take a look at the constructor.…If the constructor was only one line of code,…we could use an expression-bodied member.…The first thing we are going to do is refactor the constructor…to call a method to initialize an array.…
So I'm going to highlight this…and right-click on it…and click quick actions and refactorings…and we'll extract a method…and instead of new method here,…we are going to call the method InitArray just like that…and we'll apply it.…Now that we have a single line constructor…let's make it an expression-bodied member.…I'm going to select this and delete what we have here already…and instead change the syntax to simply…call the InitArray method…
- 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.