JohnOb Posted March 30, 2006 Posted March 30, 2006 I am using VB.Net 2003, IDE. When I type a variable name that already has been Dim'd, The IDE doesn't make the variable name Capitalized, even though the variable name definition in the Dim is capitalized. VB 6 will do this. Where is the setting so that this will happen. Someone else here at work uses VB.Net 2003, and his IDE does capitalize variables. I know this sounds minor, but in VB 6 when I type a variable name and it gets capitalized, I know that I spelled it right, and that the editor has "picked up' the variable. Thanks in Advance, John :confused: Quote
Mike_R Posted March 30, 2006 Posted March 30, 2006 Usually it should, but I find that it won't always in VB.NET, especially if you Dim a variable such as 'myVar' and then rename it 'MyVar'. In this case, all the uses of 'myVar' later in your code will not change their capitalization. I suppose that this is a minor annoyance, but in VB.NET you do not need this so much as we did in VB 6.0. With .NET, the squigly undererlines will tell you if a variable is not being recognized. That said, if your variables are never identifying the capitalization, then it sounds like something is wrong. Either there is a setting for this (somehow I don't think so?) or there is something wrong with your installation? Not sure... Quote Posting Guidelines Avatar by Lebb
JohnOb Posted March 30, 2006 Author Posted March 30, 2006 Variable Names won't Capitalize I found out what it was. The "Pretty Listing" setting needed to be set. It is in Tools - Options - Text Editor - Basic - VB Specific :D Quote
Mike_R Posted March 30, 2006 Posted March 30, 2006 Cool, glad you got it. :) Quote Posting Guidelines Avatar by Lebb
jo0ls Posted March 30, 2006 Posted March 30, 2006 Usually it should' date=' but I find that it won't always in VB.NET, especially if you Dim a variable such as 'myVar' and then rename it 'MyVar'...[/quote'] In VS 2005, at this point you get a red mark at the end of the variable, hover on it and you get the option to change the name throughout your code. Now there is no excuse for sloppy naming, aargh... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.