Is there anyway to get CSharp to auto-format like VB.NET?

A

Aaron

I like some of the auto-formatting features of VB.NET (god help me) but I
really prefer to use CSharp (C#) is there any way to get the features of
auto-indenting, auto-capitalization, and advanced intellisense like VB does?
 
D

Dean

Aaron said:
I like some of the auto-formatting features of VB.NET (god help me) but I
really prefer to use CSharp (C#) is there any way to get the features of
auto-indenting, auto-capitalization, and advanced intellisense like VB
does?

Yes, visual studio has the auto-indenting and advanced intellisense. Check
Tools > Options > Text editor > All Languages.
 
A

Aaron

Yeah, it just does not auto-indent. I type in a new variable and hit enter
and nothing.

private void blah(object sender, FileSystemEventArgs e)

{

MessageBox.Show("yo");

string doesntindent;



}
 
W

WizyDig

It works a little differantly. If you go to your line where the last
semicolon is and press enter it will create a new line and that line
will start at the same indentation as that line. VB has this advantage
and there are others but you can design a cleaner app with C# from and
Engineering or OOP/OOD stand point. It will also do some auto
formatting if you add you last brace after you have coded your scoped
code.

Wiz
 
P

Paul Qualls

Aaron said:
Yeah, it just does not auto-indent. I type in a new variable and hit enter
and nothing.

private void blah(object sender, FileSystemEventArgs e)

{

MessageBox.Show("yo");

string doesntindent;



}


Try this..

go to the end of the file and find the last curly brace..

Delete it, then re add it.. it will format your entire page..

Paul
 
T

The Last Gunslinger

Aaron said:
I like some of the auto-formatting features of VB.NET (god help me) but I
really prefer to use CSharp (C#) is there any way to get the features of
auto-indenting, auto-capitalization, and advanced intellisense like VB does?
There is a shortcut that will format selected code
CTRL+A (Select all code) CTRL+K, CTRL+F
This should autoformat all code in the current window.

HTH
JB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top