Skip to content

Instantly share code, notes, and snippets.

@CleysonPH
Created July 25, 2022 12:22
Show Gist options
  • Save CleysonPH/4a70b3255fb984a1767e9a6ca2208131 to your computer and use it in GitHub Desktop.
Save CleysonPH/4a70b3255fb984a1767e9a6ca2208131 to your computer and use it in GitHub Desktop.
VS Code C# Snippets
{
"class": {
"prefix": "class",
"body": [
"namespace $WORKSPACE_NAME.${1:NamespaceName};",
"",
"public class $TM_FILENAME_BASE",
"{ }",
],
"description": "Create a new class"
},
"interface": {
"prefix": "interface",
"body": [
"namespace $WORKSPACE_NAME.${1:NamespaceName};",
"",
"public interface $TM_FILENAME_BASE",
"{ }",
],
"description": "Create a new interface"
},
"enum": {
"prefix": "enum",
"body": [
"namespace $WORKSPACE_NAME.${1:NamespaceName};",
"",
"public enum $TM_FILENAME_BASE",
"{ }",
],
"description": "Create a new interface"
},
"controller": {
"prefix": "controller",
"body": [
"using Microsoft.AspNetCore.Mvc;",
"",
"namespace $WORKSPACE_NAME.${1:NamespaceName};",
"",
"public class $TM_FILENAME_BASE : Controller",
"{",
"",
" public IActionResult Index()",
" {",
" return View();",
" }",
"",
"}",
],
"description": "Create a new controller"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment