VS2015 ways to add code snippets to Console.readkey _c# tutorial

Source: Internet
Author: User

1, open the Code Manager

2, open after you can see the following figure shows

3, copy and paste the path, go to the folder

Add a TXT file, copy and paste the following text

 <?xml version= "1.0" encoding= "Utf-8"?> <codesnippets "xmlns=" Schemas.microsoft.com/visualstudio/2005/codesnippet "> <codesnippet format=" 1.0.0 "> <Header> ; Code Snippets for title>ck</title> <Shortcut>ck</Shortcut> <description>console.readkey </des cription> <Author>jinglingzi</Author> <SnippetTypes> <snippettype>expansion
        </SnippetType> </SnippetTypes> </Header> <Snippet> <Declarations> <literal editable= "false" > <ID>SystemConsole</ID> <function>simpletypename (g Lobal::system.console) </Function> </Literal> </Declarations> <code language= "Csha RP "><! [cdata[$SystemConsole $. Readkey (); $end $]]> </Code> </Snippet> </CodeSnippet> </codesnippets> 

Change the suffix name of the file to. Snippet.

4, where you write the code, CK and then the two tab keys, Console.readkey came out.

Skills:

5, <code language= "CSharp" ><! [cdata[$SystemConsole $. Readkey (); $end $]]>

In this line of code, $end $, which is where the cursor stops.

6, I actually will not write code snippets, that is, the CW code fragment copy paste, bold changes after the successful.

May everyone's study be a pleasant one.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.