Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Select MemberNew to Visual Studio Code? Get it now.
Select Member

Select Member

GameDevDave

|
86 installs
| (0) | Free
Select entire C# members (method/constructor/struct/enum/class) via DocumentSymbolProvider (OmniSharp).
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Select Member

A Visual Studio Code extension that streamlines the process of selecting entire C# members—methods, constructors, structs, enums, or classes—by leveraging OmniSharp’s DocumentSymbolProvider.

Features

  1. Select Entire C# Members
    Place your cursor within a method, constructor, struct, enum, or class definition, then run the command Select Member from the context menu or manually (gdd.selectMember). The entire definition is highlighted instantly.

  2. Seamless OmniSharp Integration
    Uses VS Code’s built-in vscode.executeDocumentSymbolProvider (powered by OmniSharp) to accurately detect and highlight C# symbols in source files.

  3. Pre-Warmed Symbol Cache
    The extension “warms up” the OmniSharp symbol provider when you open a file, minimizing delays and ensuring quick selection commands.

Selecting a C# Member in action:

Selecting a C# method in action


Requirements

  • Visual Studio Code version 1.60.0 or higher
  • C# (OmniSharp) Extension for VS Code

No additional setup is needed beyond having a functioning C# environment in VS Code.


Usage

  1. Open a C# file in VS Code.
  2. Place your cursor anywhere within the member (method, constructor, struct, enum, or class) you want to select.
  3. Right-click and choose Select Member, or open the Command Palette and run Select Member.

That’s it! You’ll get the entire member highlighted for easy copying or pasting.


Extension Settings

This extension has no specific settings. Its primary functionality is invoked via the Select Member command.


Known Issues

  1. Structs/Enums Mislabeling
    Occasionally, OmniSharp may categorize a struct or enum as a class symbol. This extension checks if the line includes struct or enum, usually ensuring correct selection despite the mislabel.

  2. Symbol Cache Delays
    In large codebases, OmniSharp might take a few seconds to initialize symbols when a file is first opened. If you attempt to select a member too early, you might see a “No recognized member found” message. The extension retries automatically, so just wait a moment and try again.

  3. Single-Line Definitions
    If a member is defined entirely on one line (including its braces), the selection might be off. The extension attempts to handle this by scanning for matching braces, but there may be edge cases.


Release Notes

1.0.0

  • Initial release of select-c-member-cs (packaged as "select-member-cs").
  • Key Features:
    • Select entire C# methods, constructors, classes, structs, and enums.
    • Basic handling to detect struct or enum definitions.

For feedback, questions, or contributions, please open an issue or pull request on the GitHub repository.


Enjoy “Select Member”!
We hope this extension helps speed up your workflow. Let us know if you have any suggestions to make it better.

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