DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Thomas Eyde Guest

    Autoformatting code to slanting style?

    Is it possible to customize how Visual Studio.NET autoformat C# code? I
    think I prefer the slanted style, but I also like to type Ctrl K + Ctrl F to
    autoformat code sections when necessary.

    That is, I prefer this:
    public void MyMethod() {
    return;
    }

    instead of:
    public void MyMethod()
    {
    return;
    }

    Thanks,
    Thomas Eyde



  2. #2
    Len Weaver Guest

    Re: Autoformatting code to slanting style?

    Hello Thomas,

    > Is it possible to customize how Visual Studio.NET autoformat C# code?

    I
    > think I prefer the slanted style, but I also like to type Ctrl K +

    Ctrl F to

    Under the Tools menu select Options. In the Options window select
    Text Editor from the TreeView control on the left. Under Text Editor
    click on C# and then Formatting. Once you've click on formatting the
    right hand panel will display a number of CheckBoxes. The top CheckBox
    is labelled as 'Leave open braces on same line as construct.'

    Hope this helps,
    Len



  3. #3
    Thomas Eyde Guest

    Re: Autoformatting code to slanting style?

    Thanks. I will try that. I have totally missed those options...

    Thomas

    "Len Weaver" <len.weaver@meritsoft.net> wrote in message
    news:3d96e15b@10.1.10.29...
    > Hello Thomas,
    >
    > > Is it possible to customize how Visual Studio.NET autoformat C# code?

    > I
    > > think I prefer the slanted style, but I also like to type Ctrl K +

    > Ctrl F to
    >
    > Under the Tools menu select Options. In the Options window select
    > Text Editor from the TreeView control on the left. Under Text Editor
    > click on C# and then Formatting. Once you've click on formatting the
    > right hand panel will display a number of CheckBoxes. The top CheckBox
    > is labelled as 'Leave open braces on same line as construct.'
    >
    > Hope this helps,
    > Len
    >
    >




Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links