【发布时间】:2012-07-17 06:14:54
【问题描述】:
由于我定义了以下 sn-p,因此在尝试使用环绕时总是会得到不需要的选择。
<CodeSnippet Format="1.0.0">
<Header>
<Title>Dependency Properties region</Title>
<Shortcut>#regiondp</Shortcut>
<Description>
Umschliesst die Selektion mit einer region namens Dependency Properties
</Description>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="csharp" Kind="method decl">
<![CDATA[
#region Dependency Properties
$selected$
#endregion
]]>
</Code>
</Snippet>
在 C# 文件中使用“Surround with...”时,为什么 VS2010 现在询问我是要使用“C#Snippets”还是“Visual C#”sn-ps?
【问题讨论】:
-
您在附加的 xml 中缺少 的封闭标记
-
你是对的,如果我编辑我的帖子,我可以看到它,所以它并没有真正丢失,但它没有出现。我无法纠正这个,抱歉。
-
如果我的回答对您有帮助,请考虑标记为答案。
标签: c# visual-studio-2010 code-snippets