Atlanta Custom Software Development 

 
   Search        Code/Page
 

User Login
Email

Password

 

Forgot the Password?
Services
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
Programming
  Database
Automation
OS/Networking
Graphics
Links
Tools
» Regular Expr Tester
» Free Tools

Marking strings with a different color in source code documents
[ All Languages » VB.net »  IDE]

Total Hit ( 2602)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article

Rating


 


When you build strings by concatenating hardcoded constant strings and variable strings, it's easy to forget a closing double quote, and thus receive a compile time error when you launch or compile the program (actually, you see that there is a syntax error even before, because the statement gets underlined to signal the error). VS.NET's syntax highlighting feature can make things much easier, by using a different color to mark the hardcoded strings present in your code.

To specify a color different from the default (also used for normal text/code), open the Options dialog window (Tools | Options...), select the Environment | Fonts and Colors page, select String from the listbox control, and finally select a color for it, red for example. Go back to the source code editor, and note that the strings are rendered in red, making it easier to quickly find them among the rest of the code. When you're writing code and type a double quote ( " ), the following code will be immediately rendered in red until you type a closing double quote - this way you'll never miss a double quote again!


Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )


Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.