Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4072632
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:54:34+00:00 2026-05-20T16:54:34+00:00

I want to create a Visual Studio Extension. That extension, whenever ran by the

  • 0

I want to create a Visual Studio Extension. That extension, whenever ran by the user will primarily format/indent C# code in a defined manner. For example

private void Method(int a, int b)
{
}

will be converted to something like

private void Method
(
int a,
int b
)
    {
    }

At this point I have no experience or idea about the APIs that I can use for this kind of task. I would like to know if there are any APIs that MS provides for parsing C# code in a .cs file or any third party APIs? or any general APIs that can help me in achieving this kind of thing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T16:54:35+00:00Added an answer on May 20, 2026 at 4:54 pm

    You could use the CodeElement interface (have a look at this example: HOWTO: Navigate the code elements of a file from a Visual Studio .NET macro or add-in). With that you will be able to get information about methods, for example, but I do not know if that allows you to go beyond that level.

    If that’s not enough for you, Irony comes with a C# grammar in the examples.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create an extension for Visual Studio 2010 that contains only a
I want to create a Visual Studio Item Template that generates an Item (for
I want to create a simple batch file that would perform some Visual Studio
I want to create a button in visual studio that refreshes the entire browser
in a Visual Studio Extension Package I want to create a ToolWindow (like Solution
I want to create in C# Visual Studio 2010 my user control from standard
In visual studio 2005: I want to create a dll base on another dll.
I want to create a Windows 7 64-bit (Ultimate) virtual machine with: Visual Studio
I want to create a custom ribbon button within Outlook 2007 using Visual Studio
I am working on the Visual studio 2010. want to create a dll which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.