vb.net - 扩展多行代码段在底部添加额外的行

标签 vb.net visual-studio visual-studio-2010 code-snippets

有什么方法可以防止在 VB.NET 中的多行代码段下方添加额外的行?

enter image description here

(按 Tab 键以展开代码段...)

enter image description here

我已经仔细检查过片段本身在最后没有多余的行。此外,这似乎是特定于 VB 的。

最佳答案

只需关闭 ]]你剪完之后。 ¿end¿插入剪切后,部分将插入符号设置在此位置。

<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets 
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
      <Title>tryt</Title>
      <Author>[USERNAME]</Author>
      <Description>
      </Description>
      <HelpUrl>
      </HelpUrl>
      <Shortcut>tryt</Shortcut>
    </Header>
    <Snippet>
      <Code Language="vb" Delimiter="¿"><![CDATA[Try

            ¿end¿

        Catch ex As Exception
            Throw New Exception(ex) 'or do some other stuff
        End Try]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>

关于vb.net - 扩展多行代码段在底部添加额外的行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22990688/

相关文章:

c# - ASP.NET:获取自 1/1/1970 以来的毫秒数

.net - 使 .NET 应用程序成为唯一可以运行的程序?

c - 最佳 Windows C 工具堆栈

c++ - Qt Visual Studio 插件影子构建

visual-studio-2010 - 完成调试后如何保持IIS Express运行?

mysql - 数据源 datagridview 表适配器

mysql - 错误 [IM014] [Microsoft][ODBC 驱动程序管理器] 指定的 DSN 包含驱动程序和应用程序之间的体系结构不匹配

visual-studio - 无法将多个文件从 Visual Studio 项目提交到颠覆

c# - 如何使 Visual Studio 在 C# 代码中自动包含大括号?

visual-studio-2010 - VS 2010 测试运行器错误 "The agent process was stopped while the test was running."