2

次のスニペットを定義したので、でサラウンドを使用しようとすると、常に不要な選択が発生します。

<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#ファイルで「Surroundwith ...」を使用している場合、VS2010で「C#Snippets」または「VisualC#」スニペットのどちらを使用するかを尋ねられるのはなぜですか。

4

1 に答える 1

4

独自のスニペットと、Visual Studioのインストールに付属するMSからのプリインストールされたスニペットがあるため、質問があります。

邪魔になる場合は、スニペットを次の場所に配置できます:%ProgramFiles(x86)%\ Microsoft Visual Studio 10.0 \ VC#\ Snippets \ 1033 \ Visual C#

MSからのすべてのスニペットの中で。
HTH

于 2012-07-18T09:05:54.023 に答える