/SnippetEssentials

[deprecated] Snippet Essentials has evolved into Snippetica

Primary LanguageC#OtherNOASSERTION

[deprecated] Snippet Essentials

IMPORTANT: Snippet Essentials has evolved into Snippetica.

  • Snippetica is virtually the next version of Snippet Essentials.
  • Snippetica supports more languages and it has better documentation.
  • Snippetica is available for Visual Studio 2017.

Introduction

  • Snippet Essentials is an ultimate collection of 700+ snippets for C#.
  • Snippet Essentials is distributed as Visual Studio Extension.

Links

List of Selected Snippets

Declaration

Title Shortcut
Explicit operator overload ooe
Implicit operator overload ooi
Namespace declaration ns
Public abstract class ac
Public abstract method am
Public async method ym
Public auto-implemented property with private setter pps
Public auto-implemented property p
Public class c
Public constant k
Public constructor cc
Public delegate de
Public enum em
Public event et
Public field f
Public generic event get
Public indexer ir
Public interface ie
Public method with parameters m_
Public method m
Public property with backing field p_
Public read-only auto-implemented property rp
Public read-only field rf
Public read-only property rpp
Public sealed class dc
Public static class sc
Public static field sf
Public static method sm
Public structure st
Public virtual method vm
Static constructor scc

Keyword

Title Shortcut
Default keyword d
Object keyword o
Override keyword xo
Private keyword xp
Public keyword x
Return keyword r
Static keyword xs
String keyword s

Miscellaneous

Title Shortcut
Attribute ae
Braces b
Containing type name this
Generic type constraint where
Lambda expression l
Parameter array of object pa
TODO task todo
TryParse method tpe
Type parameter g
Using static directive us
Variable declaration with explicit cast operator vt
Variable declaration with new operator vn
Variable declaration with new operator (with object initializer) vnir
Variable declaration v

Operator

Title Shortcut
Conditional operator co
Explicit cast operator t
Nameof operator no
Typeof operator to

PreprocessorDirective

Title Shortcut
#if #else preprocessor directives ppife
#if preprocessor directive ppif

Statement

Title Shortcut
Break statement bk
Continue statement ce
Else clause e
Else if statement eif
For statement (reversed) frr
For statement with array fra
For statement with collection frc
For statement fr
Foreach statement fe
If statement with condition whether the expression evaluates to false iff
If statement with condition whether the expression is equal to 0 ifz
If statement with condition whether the expression is equal to null ifn
If statement with condition whether the expression is not equal to null ifnn
If statement with else statement ife
Return false ref
Return null ren
Return statement with new keyword rn
Return statement re
Return true ret
Return zero rez
Switch statement sh
Throw new exception twne
Throw statement tw
Try catch finally tcf
Try catch tc
Try finally tf
Using statement with variable declaration un
Using statement u
While statement we
Yield break yb
Yield return new yrn
Yield return yr

System

Title Shortcut
!String.IsNullOrEmpty method snne
!String.IsNullOrWhiteSpace method snnw
Array type declaration a
Array variable declaration (with initializer) vair
Array variable declaration va
Boolean variable declaration vb
Char variable declaration vcr
Collection variable declaration vc
DateTime type declaration dt
DateTime variable declaration vdt
DateTime.Now property dtn
Debug.Assert method da
Debug.WriteLine method dw
Dictionary<TKey, TValue> variable declaration vd
Enumerable.Empty method eee
HashSet variable declaration vhs
IEnumerable type giee
IEnumerator variable declaration vgier
Int32 variable declaration vi
Int64 variable declaration vii
LINQ Select method ls
List variable declaration vl
New array (with initializer) nair
New array na
Nullable.Equals method nq
Object.Equals method oq
Object.ReferenceEquals method orq
ObservableCollection variable declaration voc
Queue variable declaration vqe
ReadOnlyCollection variable declaration vrc
Stack variable declaration vsk
StreamReader variable declaration vsmrr
StreamWriter variable declaration vsmwr
String variable declaration vs
String.Empty method se
String.Equals method sq
String.IsNullOrEmpty method sne
String.IsNullOrWhiteSpace method snw
StringBuilder variable declaration vsb
StringReader variable declaration vsrr
StringWriter variable declaration vswr
TimeSpan type declaration ts

XmlComment

Title Shortcut
Xml comment for a class constructor xccc
Xml comment for property xcp
Xml comment for read-only property xcrp

Location

Snippets are installed to the following directory: \AppData\Local\Microsoft\VisualStudio\VISUAL_STUDIO_VERSION\Extensions\EXTENSION_FOLDER