Code Snippet

 

VS 添加Snippets

 

 

 

下载文件:

propfull.7z

copy到C:\Users\哲\Documents\Visual Studio 2013\Code Snippets\Visual C#\My Code Snippets

 

文件内容:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <Title>propfull</Title>
            <Shortcut>propfull</Shortcut>
            <Description>属性和支持字段的代码段</Description>
            <Author>Microsoft Corporation</Author>
            <SnippetTypes>
                <SnippetType>Expansion</SnippetType>
            </SnippetTypes>
        </Header>
        <Snippet>
            <Declarations>
                <Literal>
                    <ID>type</ID>
                    <ToolTip>属性类型</ToolTip>
                    <Default>int</Default>
                </Literal>
                <Literal>
                    <ID>property</ID>
                    <ToolTip>属性名</ToolTip>
                    <Default>MyProperty</Default>
                </Literal>
                <Literal>
                    <ID>field</ID>
                    <ToolTip>支持此属性的变量</ToolTip>
                    <Default>myVar</Default>
                </Literal>
            </Declarations>
            <Code Language="csharp"><![CDATA[private $type$ $field$;
 
    public $type$ $property$
    {
        get { return $field$;}
        set { $field$ = value;}
    }
    $end$]]>
            </Code>
        </Snippet>
    </CodeSnippet>
</CodeSnippets>

  

 

 

出处:https://www.cnblogs.com/jackson0714/p/6055374.html

Code Snippet

 

VS 添加Snippets

 

 

 

下载文件:

propfull.7z

copy到C:\Users\哲\Documents\Visual Studio 2013\Code Snippets\Visual C#\My Code Snippets

 

文件内容:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
    <CodeSnippet Format="1.0.0">
        <Header>
            <Title>propfull</Title>
            <Shortcut>propfull</Shortcut>
            <Description>属性和支持字段的代码段</Description>
            <Author>Microsoft Corporation</Author>
            <SnippetTypes>
                <SnippetType>Expansion</SnippetType>
            </SnippetTypes>
        </Header>
        <Snippet>
            <Declarations>
                <Literal>
                    <ID>type</ID>
                    <ToolTip>属性类型</ToolTip>
                    <Default>int</Default>
                </Literal>
                <Literal>
                    <ID>property</ID>
                    <ToolTip>属性名</ToolTip>
                    <Default>MyProperty</Default>
                </Literal>
                <Literal>
                    <ID>field</ID>
                    <ToolTip>支持此属性的变量</ToolTip>
                    <Default>myVar</Default>
                </Literal>
            </Declarations>
            <Code Language="csharp"><![CDATA[private $type$ $field$;
 
    public $type$ $property$
    {
        get { return $field$;}
        set { $field$ = value;}
    }
    $end$]]>
            </Code>
        </Snippet>
    </CodeSnippet>
</CodeSnippets>

  

相关文章:

  • 2021-09-07
  • 2019-03-25
  • 2021-12-05
  • 2021-04-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-07
  • 2022-12-23
  • 2021-11-27
  • 2021-09-10
  • 2021-12-24
  • 2021-11-01
相关资源
相似解决方案