Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/J0rgeSerran0/vscode-csharp-snippets
Extension of C# Snippets for Visual Studio Code
https://github.com/J0rgeSerran0/vscode-csharp-snippets
asp-net-core csharp ef-core grpc net-5 net-core signalr-core snippets visual-studio-code visual-studio-code-extensions
Last synced: 3 months ago
JSON representation
Extension of C# Snippets for Visual Studio Code
- Host: GitHub
- URL: https://github.com/J0rgeSerran0/vscode-csharp-snippets
- Owner: J0rgeSerran0
- License: mit
- Created: 2017-07-09T18:59:12.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-08-02T13:53:58.000Z (over 2 years ago)
- Last Synced: 2024-04-20T05:33:58.923Z (10 months ago)
- Topics: asp-net-core, csharp, ef-core, grpc, net-5, net-core, signalr-core, snippets, visual-studio-code, visual-studio-code-extensions
- Homepage:
- Size: 18.8 MB
- Stars: 29
- Watchers: 4
- Forks: 16
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# C# Snippets for Visual Studio Code


[](https://marketplace.visualstudio.com/items?itemName=jorgeserrano.vscode-csharp-snippets)


This extension for Visual Studio Code adds snippets for C#.
You can find this extension in the [Visual Studio Code Marketplace](https://marketplace.visualstudio.com/items?itemName=jorgeserrano.vscode-csharp-snippets).
See the [CHANGELOG](CHANGELOG.md) 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](TUTORIALS.md) to know more**)
### C# general snippets
```csharp
#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
```csharp
sln_2017
sln_2019
```### ASP.NET Core C# snippets
```csharp
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
```csharp
api_controller
api_delete
api_get
api_put
api_post
```### .NET Extensions
```csharp
ex_md5_from_stream
ex_stream_to_string
ex_string_to_stream
```### gRPC C# snippets (.NET 5)
```csharp
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
```csharp
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
```csharp
xml_
xml_
xml_
xml_
xml_
xml_
xml_
xml_
xml_
xml_
xml_
xml_
xml_
xml_
xml_
xml_
xml_
xml_
```## 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