Visual Studio C# Code Snippet List


C# Code Snippet are very useful feature provided by VisualStudio IDE. The post Visual Studio 2012 IDE versions have unique coding experience where developer can use the C# code snippet (usually called as short form of the code) typed will insert the common code constructs/fragments. This helps rapid code development by minimizing the keystrokes. For example you want to create a new class then you would need to type “class” followed by class name and open the braces and close the braces. But if you use the C# code snippet by typing “class” followed by TAB key twice will create the class template automatically.

Visual Studio C# Code Snippet List:

namespace: The Namespace

class: The Class

ctor: The Constructor

interface: The Interface

property: The Property field

propfull: The Property field full

sim: The Static in Main function

svm: The static void main

cw: The Console.WriteLine function

if: The If statement

else: The Else statement

do: The do loop statement

while: The While loop statement

for: The For loop statement

foreach: The Foreach statement

try: The Try statement

tryf: The Tryf statement

lock: The Lock statement

switch: The Switch statement

using: The Using statement

– Article ends here –

Related Tags:

Share this:

We will be happy to hear your thoughts

Leave a reply