D
Dylan Parry
Hi,
I'm having a minor problem getting Visual Studio (2008) to format
get/set methods how I'd like them to appear. What I currently have is:
public int ID
{
get
{
return _id;
}
set
{
_id = value;
}
}
Which is a bit too "spaced out". I'd like it to appear as:
public int ID
{
get { return _id; }
set { _id = value; }
}
Basically so it's a little more readable when it comes to me editing the
code later on.
The problem is that I've managed to set up VS2008 so that it lays out
blocks of code as in the first example by default and will automatically
reformat any blocks to look like that. I'm happy with that when it comes
to the format of classes/(most) methods etc, but when it comes to
something simple like get/set methods I'd rather they were left on one
line as initially defined.
Any ideas as to how I can change this behaviour? I've looked through the
settings several times, but I'm not sure which one to change
Thanks,
--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk
The opinions stated above are not necessarily representative of
those of my cats. All opinions expressed are entirely your own.
I'm having a minor problem getting Visual Studio (2008) to format
get/set methods how I'd like them to appear. What I currently have is:
public int ID
{
get
{
return _id;
}
set
{
_id = value;
}
}
Which is a bit too "spaced out". I'd like it to appear as:
public int ID
{
get { return _id; }
set { _id = value; }
}
Basically so it's a little more readable when it comes to me editing the
code later on.
The problem is that I've managed to set up VS2008 so that it lays out
blocks of code as in the first example by default and will automatically
reformat any blocks to look like that. I'm happy with that when it comes
to the format of classes/(most) methods etc, but when it comes to
something simple like get/set methods I'd rather they were left on one
line as initially defined.
Any ideas as to how I can change this behaviour? I've looked through the
settings several times, but I'm not sure which one to change
Thanks,
--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk
The opinions stated above are not necessarily representative of
those of my cats. All opinions expressed are entirely your own.