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

  • Home
  • SEARCH
  • 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 have Visual Studio 2005 Professional ENU installed and want to create GUIDs using
Say I want to create vb.net application in Visual studio 2005. What is the
I'm writing a Visual Studio extension/add-in and I want to find the names of
I want to create a floating control - like Visual Studio's ones (The solution
I found that if you create a file called "usertype.dat" in visual studio's IDE
I want to create logical folders in visual studio which could have different structures
I developed a program in Visual Studio 2010 Express edition. I want to create
I want to create an Bluetooth chat room for pc i will use visual
I'm using Visual Basic 9 (VS2008) I want to create new Tabs as and
I want to create a function that performs a function passed by parameter on

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.