Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Sharp SnippetsNew to Visual Studio Code? Get it now.
Sharp Snippets

Sharp Snippets

aljaff94

|
587 installs
| (1) | Free
Create smart snippets for C# with namespace auto-completion support.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Sharp Snippets

Visual Studio Code snippet extension for C# language to create [ class | interface | enum | struct ] with namespace auto-completion.

Features

  • Support file-scoped namespace
  • Ability to use file-scoped namespace or old style namespace based on user setting and language support by checking csproj target framework and language version
  • Detected namespace by reading csproj file and check for RootNamespace property and if not exists then use csproj filename
  • Normalize filename to class name by converting it to pascal case and replace each space, dot with underscore

Roadmap

  • [x] option to use old style namespace
  • [x] auto detect file-scoped namespace support from csharp language version
  • [ ] custom snippet label via settings
  • [ ] namespace module auto complete

See how it works

Example

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft