Code snippets for various programming languages
Snippet | Description | Shortcut | C# | Typescript |
---|---|---|---|---|
GuardClause_Number | Guard clause to check for number equal to zero | gcn | Yes | Yes |
GuardClause_Number_Set | Guard clause to check for number equal to zero and then set a class variable | gcns | Yes | Yes |
GuardClause_Object | Guard clause to check for null or undefined objects | gco | Yes | Yes |
GuardClause_Object_Set | Guard clause to check for null or undefined objects and then set a class variable | gcos | Yes | Yes |
GuardClause_String | Guard clause to check for null or empty strings | gcs | Yes | Yes |
GuardClause_String_Set | Guard clause to check for null or empty strings and then set a class variable | gcss | Yes | Yes |
Tools -> Code Snippets Manager
Import -> Select appropriate files
Continue through the prompts
[ctrl] + [shift] + P
Preferences: Configure User Snippets
Select the appropriate language and then use the correct json file: