| Mac | Windows | |
| ⌘⌃P | Ctrl P | go to global |
| ⌘R | Ctrl R | go to symbol (Ctrl P + @) |
| ⌃G | Ctrl G | go to line (Ctrl P + :) |
| ⌃; | Ctrl ; | go to term (Ctrl P + #) |
| ⌘KB | Ctrl K B | toggle side bar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Librarian { | |
| // librarian sort strategy storage | |
| protected ISortStrategy sortStrategy; | |
| public void SetSortType(ISortStrategy sortStrategy) { | |
| this.sortStrategy = sortStrategy; | |
| } | |
| public void SortBooks(List<Books> books) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // extension methods require a static class container | |
| public static class CascadeExtensions { | |
| // use the keyword 'this' to create an extension function using the first parameter as the base type | |
| public static List<string> AddItem(this List<string> source, string item) { | |
| source.Add(item); | |
| return source; | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |