How to format {}

  • Thread starter Thread starter Arjen
  • Start date Start date
A

Arjen

Hello,

I have some code that looks like this.

public string Name
{
get
{
value;
}
set
{
}
}

How can I change it to:

public string Name {
get {
value;
}
set {
}
}

Thanks!
 
I mean... I don't want to do this with my hands... Is there a way to do this
inside VS.NET?

Thanks
 
Arjen said:
I mean... I don't want to do this with my hands... Is there a way to do this
inside VS.NET?

VS.NET 2002/3 does not have refactoring/reformatting features...
.... you have to search for an external formatter/beautifier
 
Well, it does have limited reformatting features... At least enough to
reformat curly braces:

First you should check the following option: "Tools/Options/Text
Editor/C#/Formatting/leave open braces on same line as construct"

Then, select the piece of code that you want to reformat (CTRL-A for entire
file) and run "Edit/Advanced/Format Selection" (CTRL-K CTRL-F).

Bruno.
 
Thanks!!!

This works perfect!

Arjen




Bruno Jouhier said:
Well, it does have limited reformatting features... At least enough to
reformat curly braces:

First you should check the following option: "Tools/Options/Text
Editor/C#/Formatting/leave open braces on same line as construct"

Then, select the piece of code that you want to reformat (CTRL-A for entire
file) and run "Edit/Advanced/Format Selection" (CTRL-K CTRL-F).

Bruno.

do
 
Back
Top