Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Code Snippets in Visual Studio 2012

Posted on 2013-01-09
6
Medium Priority
?
447 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 84

Accepted Solution

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

Author Comment

by:axnst2
ID: 38760901
Yeah that doesn't work...
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 75

Assisted Solution

by:käµfm³d 👽
käµfm³d   👽 earned 750 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Make the most of your online learning experience.
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

926 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