Consuming Code Snippets

Adding existing code snippets into your code is an easy task. Just for demo purposes, create a new Console project with Visual Basic and, when ready, place the cursor within the Sub Main. Right-click and select the Insert Snippet command. At this point, the IDE shows a list of available snippets categories, as shown in Figure 52.25.


FIGURE 52.25 The IDE shows a list of available snippets categories.

The first thing to mention is that code snippets files are organized in categories, such as WPF, Code Patterns, Fundamentals, and so on. A category is nothing but a folder containing a number of .snippet files. Double-click ...

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.