From d7156500302933aaf10344f3134f69fbffc1a4ac Mon Sep 17 00:00:00 2001 From: Gert Date: Thu, 26 Mar 2015 17:56:09 +0100 Subject: [PATCH] VC# snippets vs2013 --- snippets/cs.snippets | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/snippets/cs.snippets b/snippets/cs.snippets index c4291a8..53619ba 100644 --- a/snippets/cs.snippets +++ b/snippets/cs.snippets @@ -56,19 +56,23 @@ # # Feedback is welcome! # -# entry point +# Main snippet sim - public static int Main(string[] args) { + ${1:public }static int Main(string[] args) { ${0} return 0; } snippet simc public class Application { - public static int Main(string[] args) { + ${1:public }static int Main(string[] args) { ${0} return 0; } } +snippet svm + ${1:public }static void Main(string[] args){ + ${0} + } # if condition snippet if if (${1:True}) { @@ -93,7 +97,7 @@ snippet do } while (${1:True}); # while loop snippet wh - while (${1}) { + while (${1:true}) { ${0} } # for loop @@ -439,7 +443,32 @@ snippet propf } snippet propg public ${1:int} ${2:MyProperty} { get; private set; } - +# switch +snippet switch + switch (${1:switch_on}){ + ${0} + default: + } +# try +snippet try + try{ + ${0} + } + catch (${1:System.Exception}){ + throw; + } +snippet tryf + try{ + ${0} + } + finally{ + ${1} + } +# using +snippet usi + using(${1:resource}){ + ${0} + } # todo: iterator, iterindex