Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>C# Expression-bodied propsNew to Visual Studio Code? Get it now.
C# Expression-bodied props

C# Expression-bodied props

navidJL

|
402 installs
| (0) | Free
Snippet for Expression-bodied props
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Expression-bodied property snippet for C# README

Usage

Type part of a snippet, press enter.

Snippets

prope -> Generates an expression-bodied property
propef -> Generates an expression-bodied property with a private field

prope propef

Features

Automated expression-bodied property creation: This extension provides two code snippets (prope and propef) that allow you to quickly generate expression-bodied properties in C#. Simply type the snippet prefix, press Enter, and the code is generated for you.

Customizable field name: The propef snippet also generates a private field for the property, with a customizable name. This makes it easy to create and name the backing field without having to write out the full property definition manually.

Improved code readability: By using expression-bodied properties, your code can become more concise and easier to read, reducing the amount of boilerplate code you need to write and maintain.

Increased productivity: With the ability to generate code quickly and easily, you can save time and increase your productivity when working on C# projects.

Simplifies property creation: Instead of manually writing out the code for an expression-bodied property, you can use the snippets provided by this extension to simplify the process and reduce the chance of errors.

Licence

MIT

See licence.txt

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