In VS, how can I quickly add information comments and comments to my code?
In VS, how to quickly add the creation Information annotation Intro to your code
Which of the following is not used?GITTo manage the source code, if you useGITYou can use VS directly to manage source code.GitYou do not need to consider the following issues for expansion.
Create information annotation update information Annotation
Sample Code segment for updating information:
1 <? Xml version = "1.0" encoding = "UTF-8"?> 2 <CodeSnippets xmlns =" http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet "> 3 <CodeSnippet Format =" 1.0.0 "> 4 <Header> 5 <Title> up </Title> 6 <Shortcut> up </Shortcut> 7 <Description> Update code comment </Description> 8 <Author> liweihan </Author> 9 <SnippetTypes> 10 <SnippetType> Expansion </SnippetType> 11 </SnippetTypes> 12 </Header> 13 <Snippet> 14 <Declarations> 15 <Literal> 16 <ID> Description </ID> 17 <ToolTip> Update Description </ToolTip> 18 <Default> Update Description </Default> 19 </Literal> 20 <Literal> 21 <ID> Updated By </ID> 22 <ToolTip> updated By </ToolTip> 23 <Default> liweihan </Default> 24 </Literal> 25 <Literal> 26 <ID> UpdatedDate </ ID> 27 <ToolTip> date </ToolTip> 28 <Default> @ Today </Default> 29 </Literal> 30 </Declarations> 31 <Code Language = "csharp"> 32 <! [CDATA [// $ Description $ @ UpdatedBy: $ UpdatedBy $ @ UpdatedDate: $ UpdatedDate $ end $]> 33 </Code> 34 </Snippet> 35 </CodeSnippet> 36 </CodeSnippets>
Add custom code segments to
- InVSOpen the code snippet Manager
- Select "CSharp" as the language, select "My Code Snippets", copy the path in the location, and open the path in resource manager.
- Copy the custom code segment (*. snippet) to the directory opened in the previous step, and restart.