Solved

Code Snippets in Visual Studio 2012

Posted on 2013-01-09
6
438 Views
Last Modified: 2013-03-19
Hi Experts,

  I have the below snippet and it doesn't show up in IntelliSense!  Why?

<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/CodeSnippet">
  <CodeSnippet Format="1.0.0">

    <!-- The header contains information describing the snippet. -->
    <Header>

      <!-- The Title of the snippet, this will be shown in the snippets manager. -->
      <Title>For Loop - 0 base</Title>

      <!-- The description of the snippet. -->
      <!-- <Description>Inserts an Apex Notifying Property.</Description> -->

      <!-- The author of the snippet. -->
      <!-- <Author>Dave Kerr</Author> -->

      <!-- The set of characters that must be keyed in to insert the snippet. -->
      <Shortcut>forloop0</Shortcut>

      <!-- A URL for more help. -->
      <!-- <HelpUrl>http://apex.codeplex.com</HelpUrl> -->

      <!-- The set of snippet types we're dealing with - either Expansion or -->
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>

    </Header>

    <!-- Now we have the snippet itself. -->
    <Snippet>

      <!-- Sepecify the code language and the actual snippet content. -->
      <Code Language="CSharp" Kind="any">
        <![CDATA[
        for(int index = 0; index < variable; index++) 
        {
        
        }
        
        ]]>
      </Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>

Open in new window


It shows up in Snipet Manager:

Snippet manager
I try using it by typing forloop0, but InteliSense shows nothing!  This is a simple example, but I can save a lot of time using these if I can get it to work!

Thanks!
0
Comment
Question by:axnst2
  • 4
6 Comments
 

Author Comment

by:axnst2
ID: 38759948
I was able to access it by doing CTRL+K+X then it was under My Code Snippets!  It'll work though not sure why IntelliSense doesn't pick it up!  I'll keep this question open for a couple of days to see if anyone has better ideas!
0
 
LVL 78

Accepted Solution

by:
David Johnson, CD, MVP earned 250 total points
ID: 38760183
0
 

Author Comment

by:axnst2
ID: 38760901
Yeah that doesn't work...
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 74

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 250 total points
ID: 38760920
What are you typing within Intellisense? Your file appears to work for me:

Screenshot
0
 

Author Comment

by:axnst2
ID: 38767087
Yeah it doesn't do that for me....
0
 

Author Closing Comment

by:axnst2
ID: 38999265
It still doesn't work but thanks for the help!
0

Featured Post

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How to open a link from vb.net app 3 10
Get String split 5 33
Unable  to create new object 9 28
Open a word document 23 19
This is an explanation of a simple data model to help parse a JSON feed
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now