Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

how to add a new line between using statements and namespace when using custom snippet

$
0
0

Now when I import namespaces it writes the using statements close to the namespace statement. I would like a line between them.

Snippet:

<?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>ICollection using defined entity</Title>      
<Author>Stein Lundbeck</Author>      
<Description>Code for implementing ICollection with defined entity</Description>      
<Shortcut>coll</Shortcut>      
<Keywords>        
<Keyword>C#</Keyword>        
<Keyword>Collection</Keyword>      
</Keywords>    
</Header>    
<Snippet>      
<Imports>        
<Import>          
<Namespace>System.Collections.Generic</Namespace>        
</Import>        
<Import>          
<Namespace>System.Collections.ObjectModel</Namespace>        
</Import>      
</Imports>     
 <Declarations>        
<Literal Editable="true">          
<ID>Name</ID>          
<ToolTip>Name of type</ToolTip>          
<Default>myColl</Default>        
</Literal>        
<Literal Editable="true">          
<ID>TEntity</ID>          
<ToolTip>Type of generic object</ToolTip>          
<Default>string</Default>        
</Literal>      
</Declarations>      
<Code Language="csharp" Delimiter="$" Kind="file"><![CDATA[  ICollection<$TEntity$> $Name$ = new Collection<$TEntity$>();]]>      
</Code>    
</Snippet>  
</CodeSnippet>
</CodeSnippets>

Output:

using System.Collections.Generic;
using System.Collections.ObjectModel;
namespace Test
{
    class MyClass
    {

        ICollection<int> myColl = new Collection<int>();

    }  
}

As you can see, there's no line between the using statements and the namespace statement


Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>