zoukankan      html  css  js  c++  java
  • 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>
  • 相关阅读:
    C#中关于DBNULL的处理方法
    html 点击复制
    AJAX的简洁写法
    PHP 数组模糊查询
    PHP二维数组搜索返回数组
    php 数组排序得方法
    PHPExcel的使用
    使用PHPword中文乱码并且下载的方法
    关于多图上传的修改的操作
    把一个表里的两列或者三列合并为一行
  • 原文地址:https://www.cnblogs.com/CodeBase/p/3740337.html
Copyright © 2011-2022 走看看