473,400 Members | 2,145 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

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

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?
Nov 16 '05 #1
7 2484
"Aaron" <so*****@microsoft.com> wrote in message news:%
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.

--
Disclaimer: This post is solely an individual opinion and does not speak on
behalf of any organization.
Nov 16 '05 #2
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;

}
"Dean" <no*****@fakeaddress.com> wrote in message
news:cf**********@news01.intel.com...
"Aaron" <so*****@microsoft.com> wrote in message news:%
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.

--
Disclaimer: This post is solely an individual opinion and does not speak

on behalf of any organization.

Nov 16 '05 #3
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #4

"Aaron" <so*****@microsoft.com> wrote in message
news:em*************@TK2MSFTNGP10.phx.gbl...
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
Nov 16 '05 #5
SP
you can do Ctrl+A,Ctrl+K,Ctrl+F to do the same thing

SP

"Paul Qualls" <pa**@forgetaboutit.com> wrote in message
news:Ol**************@TK2MSFTNGP09.phx.gbl...

"Aaron" <so*****@microsoft.com> wrote in message
news:em*************@TK2MSFTNGP10.phx.gbl...
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

Nov 16 '05 #6
Edit > Advanced has a bunch of neat functionality

--
Grace + Peace,
Peter N Roth
Engineering Objects International
http://engineeringobjects.com
"Paul Qualls" <pa**@forgetaboutit.com> wrote in message
news:Ol**************@TK2MSFTNGP09.phx.gbl...

"Aaron" <so*****@microsoft.com> wrote in message
news:em*************@TK2MSFTNGP10.phx.gbl...
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

Nov 16 '05 #7
Aaron wrote:
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
Nov 16 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: ozgur develioglu | last post by:
Why do you use XML code in c# code like; /// <summary> /// Execute a SqlCommand (that returns no resultset) against the database specified in the connection string /// using the provided...
2
by: Alex Sheppard-Godwin | last post by:
In VS when your working on a VB code module for a web form you can see a list of object in the left hand drop down list above the code window and possible events in the right hand drop down list....
2
by: caviar | last post by:
I'm trying to read in a ref parameter from a native dll, its working in vb if i use the kernel32 functions below transforming the ref param to a vb string: Now, i want to skip this vb dll and...
7
by: Peter Smirnov | last post by:
Sorry for this newbie question but as far as I heard one need at least VisualStudio to develop CSharp applications. Is this correct? Are there otherwise some command line tools like javac.exe and...
2
by: news.microsoft.com | last post by:
Hi: I work in Csharp's parser files by LEX/YACC.Now I have only CSharp-lex.l and CSharp.y file,but they not have CSharp'comment Parse. this is a part of CSharp-lex.l. ........................
3
by: Ron Nanko | last post by:
Hi, I'm trying to setup a screensaver via a C# application. What I currently do is this: unsafe public static extern short SystemParametersInfo (int uiAction, int uiParam, int* pvParam, int...
2
by: Karl | last post by:
Hi all, I'm reasonably new to csharp so you have to forgive me asking what may be a stupid question... As I said, I'm new to CSharp but in VB I was able to click anywhere on a DataGridView...
3
by: chance | last post by:
I have this code: DataRow row = docAttachTable.NewRow(); docAttachTable.Rows.Add(row); What I want to know is the primary key number (it's auto-generated). Is there anyway to do that? ...
4
by: puzzlecracker | last post by:
something similar to ctrl-i in exclipse.
0
by: Mike | last post by:
I have a new installer that allows the same product to be installed multiple times on the same machine. I also have a configuration program in .NET 2.0 SP1. I would like the config program to be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.