Autoformatting code to slanting style?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: Autoformatting code to slanting style?

  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
    >
    >




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


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center