Visual Studio C# Code Snippet List

C# Code Snippets are a very useful feature provided by VisualStudio IDE. The post Visual Studio 2012 IDE versions have a unique coding experience where a developer can use the C# code snippet (usually called a 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, and 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 the 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 –

If you have any questions, please feel free to share your questions or comments on the comment box below.

Recommended:   Visual Studio slow intellisense
Share this:
We will be happy to hear your thoughts

Leave a reply