Skip to content

J0rgeSerran0/vscode-csharp-snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C# Snippets for Visual Studio Code

Downloads Installs Visual Studio Code Extension Issues Issues Pull Requests

alt text

This extension for Visual Studio Code adds snippets for C#.

You can find this extension in the Visual Studio Code Marketplace.

See the CHANGELOG for the latest changes included.

Usage

Put the cursor on the C# file.

Type part of a snippet, press tab, and the snippet unfolds.

If you have problems to see the snippets, press Ctrl+Space (Windows, Linux) or Cmd+Space (OSX).

(see the TUTORIALS to know more)

C# general snippets

#helloworld
~
cclear
cgo
class
classa
classd
const
cr
crk
csproj_1.0
csproj_1.1
csproj_2.0
csproj_2.1
csproj_3.1
csproj_5
cwl
dowhile
else
enum
exception
for
foreach
guid
guidn
if
ifelse
iif
immutable
interface
linq_distinct
linq_where
lock
main
method
method_async
msgbox
mstest
namespace
prop
propi
propinit
propr
pum
pvm
record
singleton
singletonl
singletonts
struct
switch
tls
todo
try
tryf
using
while

Visual Studio snippets

sln_2017
sln_2019

ASP.NET Core C# snippets

ac_#helloworld_Startup
ac_#helloworld_WebApp
ac_#helloworld_WebApi
ac_action
ac_comment
ac_conf
ac_conf_file
ac_controller
ac_csproj_2.0
ac_csproj_2.1
ac_csproj_3.1
ac_csproj_5
ac_startupenv

ASP.NET Core Web Api C# snippets

api_controller
api_delete
api_get
api_put
api_post

.NET Extensions

ex_md5_from_stream
ex_stream_to_string
ex_string_to_stream

gRPC C# snippets (.NET 5)

gRPC_client_csproj
gRPC_client_program
gRPC_proto
gRPC_server_csproj
gRPC_server_program
gRPC_server_service
gRPC_server_settings
gRPC_server_startup

ASP.NET Core Razor C# snippets

rz_code
rz_comment
rz_directive
rz_dowhile
rz_for
rz_foreach
rz_functions
rz_if
rz_ifelse
rz_implements
rz_inherits
rz_inject
rz_model
rz_namespace
rz_raw
rz_renderbody
rz_switch
rz_try
rz_using
rz_viewbag
rz_viewdata
rz_while

XML Comments snippets

xml_<c>
xml_<code>
xml_<example>
xml_<exception>
xml_<include>
xml_<list>
xml_<para>
xml_<param>
xml_<paramref>
xml_<permission>
xml_<remarks>
xml_<returns>
xml_<see>
xml_<seealso>
xml_<summary>
xml_<typeparam>
xml_<typeparamref>
xml_<value>

Installation

  1. Install Visual Studio Code 1.5.0 or higher
  2. Launch Visual Studio Code
  3. From the command palette Ctrl-Shift-P (Windows, Linux) or Cmd-Shift-P (OSX)
  4. Select Install Extension
  5. Search and choose the extension
  6. Reload Visual Studio Code