From the course: Learning Visual Studio Code (2017)
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Code Refactoring - Visual Studio Tutorial
From the course: Learning Visual Studio Code (2017)
Code Refactoring
- [Narrator] When coding, efficiency is everything, and that not only goes for the quality of the code but also the time that it takes to write it. So, let's talk about refactoring, and I'm using the term loosely because refactoring often refers to re-arranging your code to make it shorter, to make it more readable, but it really has to do with efficiency, and part of that that I feel falls in that umbrella of refactoring is working with snippets. Visual Studio has the feature of using a snippet where you could just type in a few letters that will extend a series of lines of code that you don't need to write yourself. Let's go ahead and demonstrate what I'm talking about. In Visual Studio Code, in our .net project, let's go ahead and navigate to a JavaScript file, specifically within the wwroot folder under js, you'll see a site.js file. And I want to demonstrate a simple example of a snippet. If I typed in the word function I don't even need to finish writing it, but with the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.