ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

C# Snippets

by etic ALL

C# snippets for Sublime Text

Details

Installs

  • Total 56K
  • Win 42K
  • Mac 8K
  • Linux 6K
Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19
Windows 0 2 1 1 2 2 1 0 3 4 2 2 3 3 1 1 0 3 2 2 4 2 1 0 1 4 4 4 3 5 3 1 8 2 1 0 2 3 1 1 1 6 6 1 4 1
Mac 1 0 2 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 2 0 0 0 2 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0
Linux 0 0 0 0 2 0 1 2 0 1 0 2 1 2 2 2 0 0 0 0 1 0 1 0 0 2 0 2 0 0 0 0 0 0 0 1 0 0 0 1 1 1 3 0 0 0
0246810Jun 3May 31May 28May 25May 22May 19May 16May 13May 10May 7May 4May 1Apr 28Apr 25Apr 22Apr 19Jun 3 Linux: 0 Mac: 1 Windows: 0Jun 2 Linux: 0 Mac: 0 Windows: 2Jun 1 Linux: 0 Mac: 2 Windows: 1May 31 Linux: 0 Mac: 0 Windows: 1May 30 Linux: 2 Mac: 0 Windows: 2May 29 Linux: 0 Mac: 1 Windows: 2May 28 Linux: 1 Mac: 0 Windows: 1May 27 Linux: 2 Mac: 0 Windows: 0May 26 Linux: 0 Mac: 0 Windows: 3May 25 Linux: 1 Mac: 1 Windows: 4May 24 Linux: 0 Mac: 0 Windows: 2May 23 Linux: 2 Mac: 0 Windows: 2May 22 Linux: 1 Mac: 0 Windows: 3May 21 Linux: 2 Mac: 0 Windows: 3May 20 Linux: 2 Mac: 0 Windows: 1May 19 Linux: 2 Mac: 0 Windows: 1May 18 Linux: 0 Mac: 0 Windows: 0May 17 Linux: 0 Mac: 0 Windows: 3May 16 Linux: 0 Mac: 0 Windows: 2May 15 Linux: 0 Mac: 0 Windows: 2May 14 Linux: 1 Mac: 1 Windows: 4May 13 Linux: 0 Mac: 0 Windows: 2May 12 Linux: 1 Mac: 1 Windows: 1May 11 Linux: 0 Mac: 0 Windows: 0May 10 Linux: 0 Mac: 1 Windows: 1May 9 Linux: 2 Mac: 2 Windows: 4May 8 Linux: 0 Mac: 0 Windows: 4May 7 Linux: 2 Mac: 0 Windows: 4May 6 Linux: 0 Mac: 0 Windows: 3May 5 Linux: 0 Mac: 2 Windows: 5May 4 Linux: 0 Mac: 0 Windows: 3May 3 Linux: 0 Mac: 0 Windows: 1May 2 Linux: 0 Mac: 0 Windows: 8May 1 Linux: 0 Mac: 0 Windows: 2Apr 30 Linux: 0 Mac: 0 Windows: 1Apr 29 Linux: 1 Mac: 0 Windows: 0Apr 28 Linux: 0 Mac: 0 Windows: 2Apr 27 Linux: 0 Mac: 0 Windows: 3Apr 26 Linux: 0 Mac: 1 Windows: 1Apr 25 Linux: 1 Mac: 0 Windows: 1Apr 24 Linux: 1 Mac: 0 Windows: 1Apr 23 Linux: 1 Mac: 0 Windows: 6Apr 22 Linux: 3 Mac: 1 Windows: 6Apr 21 Linux: 0 Mac: 0 Windows: 1Apr 20 Linux: 0 Mac: 0 Windows: 4Apr 19 Linux: 0 Mac: 0 Windows: 1Jun 3 Linux: 0 Mac: 1 Windows: 0Jun 2 Linux: 0 Mac: 0 Windows: 2Jun 1 Linux: 0 Mac: 2 Windows: 1May 31 Linux: 0 Mac: 0 Windows: 1May 30 Linux: 2 Mac: 0 Windows: 2May 29 Linux: 0 Mac: 1 Windows: 2May 28 Linux: 1 Mac: 0 Windows: 1May 27 Linux: 2 Mac: 0 Windows: 0May 26 Linux: 0 Mac: 0 Windows: 3May 25 Linux: 1 Mac: 1 Windows: 4May 24 Linux: 0 Mac: 0 Windows: 2May 23 Linux: 2 Mac: 0 Windows: 2May 22 Linux: 1 Mac: 0 Windows: 3May 21 Linux: 2 Mac: 0 Windows: 3May 20 Linux: 2 Mac: 0 Windows: 1May 19 Linux: 2 Mac: 0 Windows: 1May 18 Linux: 0 Mac: 0 Windows: 0May 17 Linux: 0 Mac: 0 Windows: 3May 16 Linux: 0 Mac: 0 Windows: 2May 15 Linux: 0 Mac: 0 Windows: 2May 14 Linux: 1 Mac: 1 Windows: 4May 13 Linux: 0 Mac: 0 Windows: 2May 12 Linux: 1 Mac: 1 Windows: 1May 11 Linux: 0 Mac: 0 Windows: 0May 10 Linux: 0 Mac: 1 Windows: 1May 9 Linux: 2 Mac: 2 Windows: 4May 8 Linux: 0 Mac: 0 Windows: 4May 7 Linux: 2 Mac: 0 Windows: 4May 6 Linux: 0 Mac: 0 Windows: 3May 5 Linux: 0 Mac: 2 Windows: 5May 4 Linux: 0 Mac: 0 Windows: 3May 3 Linux: 0 Mac: 0 Windows: 1May 2 Linux: 0 Mac: 0 Windows: 8May 1 Linux: 0 Mac: 0 Windows: 2Apr 30 Linux: 0 Mac: 0 Windows: 1Apr 29 Linux: 1 Mac: 0 Windows: 0Apr 28 Linux: 0 Mac: 0 Windows: 2Apr 27 Linux: 0 Mac: 0 Windows: 3Apr 26 Linux: 0 Mac: 1 Windows: 1Apr 25 Linux: 1 Mac: 0 Windows: 1Apr 24 Linux: 1 Mac: 0 Windows: 1Apr 23 Linux: 1 Mac: 0 Windows: 6Apr 22 Linux: 3 Mac: 1 Windows: 6Apr 21 Linux: 0 Mac: 0 Windows: 1Apr 20 Linux: 0 Mac: 0 Windows: 4Apr 19 Linux: 0 Mac: 0 Windows: 1Jun 3 Linux: 0 Mac: 1 Windows: 0Jun 2 Linux: 0 Mac: 0 Windows: 2Jun 1 Linux: 0 Mac: 2 Windows: 1May 31 Linux: 0 Mac: 0 Windows: 1May 30 Linux: 2 Mac: 0 Windows: 2May 29 Linux: 0 Mac: 1 Windows: 2May 28 Linux: 1 Mac: 0 Windows: 1May 27 Linux: 2 Mac: 0 Windows: 0May 26 Linux: 0 Mac: 0 Windows: 3May 25 Linux: 1 Mac: 1 Windows: 4May 24 Linux: 0 Mac: 0 Windows: 2May 23 Linux: 2 Mac: 0 Windows: 2May 22 Linux: 1 Mac: 0 Windows: 3May 21 Linux: 2 Mac: 0 Windows: 3May 20 Linux: 2 Mac: 0 Windows: 1May 19 Linux: 2 Mac: 0 Windows: 1May 18 Linux: 0 Mac: 0 Windows: 0May 17 Linux: 0 Mac: 0 Windows: 3May 16 Linux: 0 Mac: 0 Windows: 2May 15 Linux: 0 Mac: 0 Windows: 2May 14 Linux: 1 Mac: 1 Windows: 4May 13 Linux: 0 Mac: 0 Windows: 2May 12 Linux: 1 Mac: 1 Windows: 1May 11 Linux: 0 Mac: 0 Windows: 0May 10 Linux: 0 Mac: 1 Windows: 1May 9 Linux: 2 Mac: 2 Windows: 4May 8 Linux: 0 Mac: 0 Windows: 4May 7 Linux: 2 Mac: 0 Windows: 4May 6 Linux: 0 Mac: 0 Windows: 3May 5 Linux: 0 Mac: 2 Windows: 5May 4 Linux: 0 Mac: 0 Windows: 3May 3 Linux: 0 Mac: 0 Windows: 1May 2 Linux: 0 Mac: 0 Windows: 8May 1 Linux: 0 Mac: 0 Windows: 2Apr 30 Linux: 0 Mac: 0 Windows: 1Apr 29 Linux: 1 Mac: 0 Windows: 0Apr 28 Linux: 0 Mac: 0 Windows: 2Apr 27 Linux: 0 Mac: 0 Windows: 3Apr 26 Linux: 0 Mac: 1 Windows: 1Apr 25 Linux: 1 Mac: 0 Windows: 1Apr 24 Linux: 1 Mac: 0 Windows: 1Apr 23 Linux: 1 Mac: 0 Windows: 6Apr 22 Linux: 3 Mac: 1 Windows: 6Apr 21 Linux: 0 Mac: 0 Windows: 1Apr 20 Linux: 0 Mac: 0 Windows: 4Apr 19 Linux: 0 Mac: 0 Windows: 1

Readme

Source
raw.​githubusercontent.​com

CSharpSnippets

C# snippets for Sublime Text.

Installation

From Package Control

Recommended method of installation. Search for C# Snippets or just C#.

Linux

git clone git://github.com/etic/CSharpSnippets.git ~/.config/sublime-text-3/Packages

OSX

git clone git://github.com/etic/CSharpSnippets.git ~/Library/Application Support/Sublime Text 3/Packages

Windows

git clone git://github.com/etic/CSharpSnippets.git %userprofile%\AppData\Roaming\Sublime Text 3\Packages

Code Snippets

[case] Case

case ${1:Constant}:
  ${0}
  break;

[class] Class

${1:public} class ${2:ClassName} 
{
  ${0}
}

[ctor] Constructor

${1:public} ${2:ClassName} (${3:Parameters}) 
{
  ${0}
}

[default] Default

default:
  ${0}
  break;

[delegate] Delegate

public delegate ${1:ReturnType} ${2:DelegateName}(${3:Parameters});

[else] Else

else {
    ${0}
}

[elseif] Else If

else if (${1:Condition}) {
    ${0}
}

[for] For

for (${1:Initializer}; ${2:Condition}; ${3:Update}) 
{
    ${0}
}

[fact] xUnit Test Method

[Fact]
${1:public} void ${2:TestName}() 
{
    //Given

    //When

    //Then
}${0}

[foreach] ForEach

foreach (${1:Type} in ${2:Collection}) 
{
    ${0}
}

[if] If

if (${1:Condition}) 
{
    ${0}
}

[interface] Interface

interface ${1:InterfaceName} 
{
    ${0}
}

[ns] Namespace

namespace ${1:NamespaceName} 
{
    ${0}
}

[pm] Private Method

private ${1:ReturnType} ${2:MethodName}(${3:Parameters}) 
{
    ${0}
}

[pr] Property (Read-Only)

${3:public} ${1:Type} ${2:PropertyName} 
{
    get;
    private set;
}${0}

[prop] Property (Read-Write)

${1:public} ${2:Type} ${3:PropertyName} { get; set; }${0}

[pum] Public Method

public ${1:ReturnType} ${2:MethodName}(${3:Parameters}) 
{
    ${0}
}

[struct] Struct

${1:public} struct ${2:StructName} 
{
    ${0}
}

[switch] Switch

switch (${1:Expression}) 
{
    ${0}
}

[try] Try / Catch / Finally

try 
{
    ${1}
} catch {${2:System.Exception} e) 
{
    ${3}
} finally 
{
    ${0}
}

[us] Using

using ${1:System};

[while] While

while (${1:Condition})
{
    ${0}
}

Documentation Snippets

[c] C documentation tag

<c>${1}</c>

[code] Code documentation tag

/// <code>
/// ${1}
/// </code>

[example] Example documentation tag

/// <example>
/// ${1}
/// </example>

[exception] Exception documentation tag

/// <exception cref="${1:member}">${2}</exception>

[include] Include documentation tag

/// <include file='${1:filepath}' path='${2:tagpath}[@${3:name}="${4}"]' />

[list] List documentation tag

/// <list type="{1:type}">
/// ${2}
/// </list>

[description] List description documentation tag

/// <description>${1}</description>

[listheader] Listheader documentation tag

/// <listheader>
/// ${1}
/// </listheader>

[item] List item documentation tag

/// <item>
/// ${1}
/// </item>

[term] List term documentation tag

/// <term>${1}</term>

[para] Para documentation tag

/// <para>${1}</para>

[param] Param documentation tag

/// <param name="${1:name}">${2}</param>

[paramref] Paramref documentation tag

/// <paramref name="${1:name}"/>

[permission] Permission documentation tag

/// <permission cref="${1:member}">$2}</permission>

[remarks] Remarks documentation tag

/// <remarks>
/// ${1}
/// </remarks>

[returns] Returns documentation tag

/// <returns>${1}</returns>

[see] See documentation tag

<see cref="${1:member}" />

[seealso] Seealso documentation tag

/// <seealso cref="${1:member}" />

[summary] Summary documentation tag

/// <summary>
/// ${1}
/// </summary>

[typeparam] Typeparam documentation tag

/// <typeparam name="${1:name}">${2}</typeparam>

[typeparamref] Typeparamref documentation tag

<typeparamref name="${1:name}" />

[value] Value documentation tag

/// <value>${1}</value>

License

MIT