• Cnic.Snippet


    <?xml version="1.0" encoding="utf-8"?>
    <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
        <CodeSnippet Format="1.0.0">
            <Header>
                <Title>usingSR</Title>
                <Shortcut>usingSR</Shortcut>
                <Description>StreamReader 循环的代码段</Description>
                <Author>Microsoft Corporation</Author>
                <SnippetTypes>
                    <SnippetType>Expansion</SnippetType>
                    <SnippetType>SurroundsWith</SnippetType>
                </SnippetTypes>
            </Header>
            <Snippet>
                <Declarations>
                    <Literal>
                        <ID>path</ID>
                        <ToolTip>路径</ToolTip>
                        <Default>@""</Default>
                    </Literal>
                </Declarations>
                <Code Language="csharp"><![CDATA[
                using (StreamReader sr = new StreamReader($path$))
                {
                    string line = sr.ReadLine();
                    while (line != null)
                    {
                        $end$
                        line = sr.ReadLine();
                    }
                }]]>
                </Code>
            </Snippet>
        </CodeSnippet>
    </CodeSnippets>
    <?xml version="1.0" encoding="utf-8"?>
    <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
        <CodeSnippet Format="1.0.0">
            <Header>
                <Title>usingSW</Title>
                <Shortcut>usingSW</Shortcut>
                <Description>StreamWriter 循环的代码段</Description>
                <Author>Microsoft Corporation</Author>
                <SnippetTypes>
                    <SnippetType>Expansion</SnippetType>
                    <SnippetType>SurroundsWith</SnippetType>
                </SnippetTypes>
            </Header>
            <Snippet>
                <Declarations>
                    <Literal>
                        <ID>path</ID>
                        <ToolTip>路径</ToolTip>
                        <Default>@""</Default>
                    </Literal>
                    <Literal>
                        <ID>msg</ID>
                        <ToolTip>msg</ToolTip>
                        <Default>""</Default>
                    </Literal>
                </Declarations>
                <Code Language="csharp"><![CDATA[
                using (StreamWriter sw = new StreamWriter($path$)
                {
                    sw.WriteLine($msg$);
                    $end$
                }]]>
                </Code>
            </Snippet>
        </CodeSnippet>
    </CodeSnippets>
  • 相关阅读:
    BZOJ4675: 点对游戏
    Codeforces 1097 Alex and a TV Show
    UOJ#349. 【WC2018】即时战略
    DNS解析过程详解
    js中bind、call、apply函数的用法
    jQuery.extend 函数详解
    JQuery Mobile
    JQuery Mobile 页面参数传递
    HTML div 滚动条样式设计
    JavaScript 加载动画Canvas 设计
  • 原文地址:https://www.cnblogs.com/CodeBase/p/3740337.html
Copyright © 2020-2023  润新知