Doing Snippets in.NET Tuc Goodwin February 2008. Agenda What is a “snippet”? Where do I find Snippets? How do I use snippets? Demo How do I create a snippet?

Slides:



Advertisements
Similar presentations
Interaction Design: Visio
Advertisements

1 After completing this lesson, you will be able to: Create a new presentation using a design template. Enter text in the Slide pane. Create a new slide.
1 Unit 02. Visual Studio Visual Studio.NET Creating Projects Project Anatomy Using the IDE Code Snippets.
Effective Creating Address groups Using Address groups Attaching Documents Copyright Gary Maunder, 2003 Nipawin School Division No.61,
G-C-I.COM Visual Studio 2005 Code Snippets.
Creating a Dialog-Based Comet Windows Program Brian Levantine.
XP Information Technology Center - KFUPM1 Microsoft Office FrontPage 2003 Creating a Web Site.
Copyright 2007, Paradigm Publishing Inc. POWERPOINT 2007 CHAPTER 1 BACKNEXTEND 1-1 LINKS TO OBJECTIVES Create Presentation Open, Save, Run, Print, Close,Delete.
MENUS AND THE MENU EDITOR Elements of a Menu Menu bar Menu title Separator bar Menu items.
CS 1400 Using Microsoft Visual Studio 2005 if you don’t have the appropriate appendix.
Introduction to Computers II A Presentation of the Elmhurst Public Library.
 Definition of HTML Definition of HTML  Tags in HTML Tags in HTML  Creation of HTML document Creation of HTML document  Structure of HTML Structure.
COMPREHENSIVE Excel Tutorial 8 Developing an Excel Application.
Introduction to Communicator 2007 Send and receive instant messages Now for the payoff: instant messages. They combine the advantages of and phone.
2. Introduction to the Visual Studio.NET IDE 2. Introduction to the Visual Studio.NET IDE Ch2 – Deitel’s Book.
Visual Studio Tips and Tricks. Credits Zain Naboulsi Microsoft Developer Evangelist isbn:
I Can… Define basic file management and related terms Identify levels of a file system Identify and explain ways to view files in Windows OS Explain the.
Introduction to VB.NET Tonga Institute of Higher Education.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 22 Macros.
| | Tel: | | Computer Training & Personal Development Outlook Express Complete.
StyleCop Breaking down the barriers to entry Gary Ewan Park Twitter: Blog:
Windows Web Xbox Mobile … and WakeUpAndCode.com.
Activating Clarity  Activating Clarity  Activation  Online Activation  Fax Activation  Review and Verify Activation and License Terms  Updating.
MS Outlook ® Version 2007 Created by: Patricia Cerio Software Training Specialist Mohawk Regional Information Center “Transitioning.
VistA Imaging Capture via Scanning. October VistA Imaging Capture via Scanning The information in this documentation includes only new and updated.
Intro to Excel - Session 7.31 Tutorial 7 - Session 7.3 Developing an Excel Application.
Program Design and Coding
Microsoft Visual Basic 2010 CHAPTER THREE Program Design and Coding.
Introduction It is developed to create software applications. It is a tool for developers of any program that uses both basic and expert settings. It.
Unity 5 Visual Studio Code * Asset Store * FPS * Terrain.
Using Microsoft Visual Studio 2005 Original by Suma Rao Revised by John G. McMahon ( 9/6/2008 )
Microsoft Outlook 2010 Chapter 3 Managing Contacts and Personal Contact Information with Outlook.
Chapter 4 Creating a Custom Publication from Scratch Microsoft Publisher 2013.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 8 Debugging, Creating Executable Files, and Distributing a Windows Application.
Introduction to Web Services. Examples Using a Web Service Creating a new Web Service.
Microsoft Visual Basic 2005 BASICS Lesson 1 A First Look at Microsoft Visual Basic.
Click your mouse to continue. The Office Shortcut Bar The Office Shortcut Bar contains program buttons that, when clicked, start new documents or start.
1 Getting Started with C++. 2 Objective You will be able to create, compile, and run a very simple C++ program on Windows, using Visual Studio 2008.
DMED1100 InDesign Advanced Class 8. Agenda  Scripting  Introduction to XML 2.
MICROSOFT POWERPOINT (MICROSOFT POWERPOINT)
1 Programming Environment and Tools VS.Net 2012 First project MSDN Library.
Copyright © Curt Hill More Components Varying the input of Dev-C++ Windows Programs.
How to Download and Install the Naper eReader and eBook Naper Publishing Group.
Java Programming, Second Edition Appendix A Working with Java SDK 1.4.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft® Excel 2013.
The CLS IS Unit Presents Creating Schedules What are schedules in Entourage? By using Entourage to set up schedules, you can easily automate certain.
1 How to Install OpenGL u Software running under Microsoft Windows makes extensive use of "dynamic link libraries." A dynamic link library (DLL) is a set.
Landscaper 101. Time Code AMC AMCNET HELP!!! Where do you go for help? –Upper right corner has a ? for the online help –This presentation.
Keeping Organized Managing your folders and files on your computer.
Learningcomputer.com SQL Server 2008 – Management Studio.
How to use in outlook 365. Opening outlook 365 Firstly you want to click the windows button in the bottom left corner of your screen which will.
A lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft® Excel 2013.
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Using Macros Lesson.
Lesson 17 Mail Merge. Overview Create a main document. Create a data source. Insert merge fields into a main document. Perform a mail merge. Use data.
Chapter 11 Enhancing an Online Form and Using Macros Microsoft Word 2013.
Getting Started NX Journaling Jeff Roark Yanfeng Automotive Interiors.
Excel Tutorial 8 Developing an Excel Application
Microsoft Word Objectives
Export Application Object Tree Items
Introduction to VB6 Week 1 3/2/2004 PPCC - Introduction to VB6
Decisions, repetition, Code Snippets, Comments, and Intellisense
Mary Stoner Library Director Anne West Lindsey District Library
Instructions for Windows users:
Instructions for Windows users:
Instructions for Windows users:
Double click Microsoft Visual Studio 2010 on the Computer Desktop
These slides are for reference only. They are not "lecture notes"
Configuring Classification Management
Presentation transcript:

Doing Snippets in.NET Tuc Goodwin February 2008

Agenda What is a “snippet”? Where do I find Snippets? How do I use snippets? Demo How do I create a snippet? What is the XML format for a snippet? Other Examples Other Tools Other Resources Review

What is a “snippet”? Visual Studio 2005 includes a code library consisting of several hundred pieces of code, called IntelliSense code snippets, that are ready to be inserted in your application. Each snippet performs a complete programming task such as creating a custom exception, sending an message, or drawing a circle. You can insert a snippet into your source code with a few mouse clicks.

What programming Languages do I have snippets in? C# VB.Net XML J#

Where do I find Snippets? On your Machine  C:\Program Files\Microsoft Visual Studio 8\VB\Snippets\1033  C:\Program Files\Microsoft Visual Studio 8\VC#\Snippets\1033 On the Internet 

How do I use snippets? While you are writing code… There are two ways that you can easily use snippets:  Snippet Manager  Control keys

Snippet manager To access the Code Snippets Manager On the Tools menu, click Code Snippets Manager

Control Keys To access the Control Keys From the Edit menu, choose IntelliSense, Insert Snippet or Ctrl K, Ctrl X

Demo Create a Snippet Dim strReply as String strReply = InputBox("Please enter the passcode", _ "Secret PassCode") If strReply.ToUpper.Equals("$strSecret$".ToUpper) Then MsgBox("Welcome!", MsgBoxStyle.Information, _ "$strTitle$") Else MsgBox("Access Denied!", MsgBoxStyle.Critical, _ "$strTitle$") End If

Ok, how do I create snippets? title author shortcut description SurroundsWith Expansion name value $name$ $selected$ $end$ ]]>

OR Insert an XML File Use the Snippet Manager / Control Keys Secret: Got to add …

Snippet manager The Code Snippets Manager allows you to set the directories and individual snippets that you want available to insert into your code.

To import a code snippet into the Code Snippet Manager 1. In the Language list, select the language that you want to add the code snippet. 2. Select the existing folder that you want to place the imported code snippet into. 3. Click Import. This opens the Code Snippets Directory window. 4. Select the code snippet file that you want to add to the Code Snippets Manager and click OK. 5. The code snippet is now available for insertion into the code editor.

Other Tools

Review We used code snippets We created code snippets We imported code snippets

Next Time MarchWhat’s New in VS 2008 AprilADO.NET Revisited MayXML Serialization JuneTBD