C# Documentation
This is my C# Documentation. It's very spotty.
Links
C# First Steps Tutorial von Microsoft
VSCode Snippets
// Default Snippets
"if": {
"prefix": "if",
"description": "if block<T>\n",
"body": [
"if (${1})",
"{",
"\t${0}",
"}"
]
},
"List": {
"prefix": "List",
"description": "List<T>\n",
"body": [
"List<${1:int}> ${2:list} = new List<${1:int}>();",
"${0}"
]
},
"Dictionary": {
"prefix": "Dictionary",
"description": "Dictionary<TKey, TValue>\n",
"body": [
"Dictionary<${1:int}, ${2:string}> ${3:dictionary} = new Dictionary<${1:int}, ${2:string}>();",
"${0}"
]
},
"For Loop": {
"prefix": "For Loop",
"body": [
"for (int ${1:i} = 0; ${1:i} < ${2:iterator}.Count; ${1:i}++) ",
"{",
"\t${0}",
"}"
],
"description": "C-style for loop\n"
},
"ForEach Loop": {
"prefix": "foreach",
"description": "ForEach loop\n",
"body": [
"foreach (${1:var} ${2:item} in ${3:list})",
"{",
"\t${0}",
"}"
]
},
"Try Catch": {
"prefix": "Try-Catch Statement",
"body": [
"try",
"{",
"\t${1}",
"}",
"catch",
"{",
"}",
"${0}"
],
"description": "C-style for loop\n"
},
"Switch Statement": {
"prefix": "switch",
"body": [
"switch (${1:caseSwitch})",
"{",
"\tcase ${2:1}:",
"\t\t${3}",
"\t\tbreak;",
"\tdefault:",
"\t\tbreak;",
"}${0}"
],
"description": "Switch Statement boilerplate\n"
},
"Basic Class": {
"prefix": "Basic Class",
"body": [
"public class ${TM_FILENAME_BASE}",
"{",
"\t${0}",
"}"
],
"description": "A basic class template\n"
},
"Namespace Statement": {
"prefix": "namespace",
"body": [
"namespace ${WORKSPACE_NAME}.${1:myNameSpace}",
"{",
"\t${TM_SELECTED_TEXT}${0}",
"}"
],
"description": "Namespace template\n"
},
"Get/Set Statement": {
"prefix": "get set",
"body": [
"private ${1:Type} _${2:fieldName};",
"public ${1:Type} ${2:fieldName}",
"{",
"\tget { return _${2:fieldName}; }",
"\tset { _${2:fieldName} = value; }",
"}"
],
"description": "Get/Set template\n"
},
// Documentation snippets
"Comments: Remarks": {
"prefix": "Remarks",
"body": [
"<remarks>${1:my remarks}</remarks>${0}"
],
"description": "Comment Remarks\n"
},