Valimai
asked on
#region directive - indent contents of code within
Hi there.
When using the #region directive, is there a way with Visual Studio settings to indent the contents automatically?
#region "Private Methods"
private void blah()
{
}
#region
to become
#region "Private Methods"
private void blah()
{
}
#region
?
I know i can indent manually, however, sometimes this work gets undone, especially with copy and paste rearranging.
cheers
When using the #region directive, is there a way with Visual Studio settings to indent the contents automatically?
#region "Private Methods"
private void blah()
{
}
#region
to become
#region "Private Methods"
private void blah()
{
}
#region
?
I know i can indent manually, however, sometimes this work gets undone, especially with copy and paste rearranging.
cheers
ASKER
Thats a nice shortcut, but it resets any tabbing out i have done. (resets anyway for different reasons and is a constant fight).
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks for your help!
Tools-> Options-> Text Editor -> c#-> Formatting -> General
There is no automatic formatting like in VB in C#
You can try
Control + K
Control + D to autoformat it
Or