Skip to content

This extension allows users to quickly generate basic C# template code within Visual Studio Code.

License

Notifications You must be signed in to change notification settings

JuCuAcc/cSharpSnippet

Repository files navigation

cSharpSnippet Extension for VS Code

This extension allows users to quickly generate basic C# template code within Visual Studio Code. https://marketplace.visualstudio.com/items?itemName=MDJashimUddin.c-sharp-snippet

Features

Snippet Shortcut Description
!cs-class Generates C# class template
!cs-interface Generates C# interface template
!cs-struct Generates C# struct template
!cs-enum Generates C# enum template
!cs-console Generates C# Console App starting code
!cs-method Generates C# method template
!cs-prop Generates C# property template
!cs-ctor Generates C# constructor template
!cs-if Generates C# if statement template
!cs-switch Generates C# switch statement template
!cs-while Generates C# while loop template
!cs-for Generates C# for loop template
!cs-foreach Generates C# foreach loop template
!cs-trycatch Generates C# try-catch block template
!cs-using Generates C# using statement template
!cs-lock Generates C# lock statement template
!cs-return Generates C# return statement template
!cs-namespace Generates C# namespace template
!cs-abstract Generates C# abstract class template
!cs-partial Generates C# partial class template
!cs-static Generates C# static method template
!cs-conn Generates C# connectionString

Usage

  1. Open Visual Studio Code and navigate to the Extensions view (View > Extensions)
  2. Search for "cSharpSnippet" and click the "Install" button
  3. Open a new file or navigate to an existing file in a C# project
  4. Right-click in the editor and select "Generate C# template code"
  5. Select the desired template type (class, interface, struct, or enum)
  6. Enter the name of the template and press enter
  7. The template code will be generated at the cursor location

Requirements

  • Visual Studio Code
  • C# extension for Visual Studio Code (Recommended for full C# language support)

Release Notes

0.0.3

  • Initial release
  • Includes class, interface, struct, enum, console app, method, property, constructor, if statement, switch statement, while loop, for loop, foreach loop, try-catch block, using statement, lock statement, return statement, namespace, abstract class, partial class, static method, and connectionString template generation.

Contributing

If you have any ideas for new features or find any bugs, please open an issue or submit a pull request.

License

This extension is licensed under the MIT license.

Acknowledgements

This extension was created by MD. Jashim Uddin and is not affiliated with Microsoft.

About

This extension allows users to quickly generate basic C# template code within Visual Studio Code.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published