none
Source Code Strings should be different color (C#) RRS feed

  • General discussion

  •  When formatting source code with color, the strings should have a different color instead of blue since blue is for language identifiers.  Just a little usability improvement.  I've included some C# code below from a VS 2008 SDK Sample to demonstrate.

    1         static bool HandleView(string cmd, string[] cmds)  
    2         {  
    3             if (cmds.Length != 2)  
    4                 return false;  
    5  
    6             int id = 0;  
    7             if (int.TryParse(cmds[1], out id) == false)  
    8                 return false;  
    9  
    10             string connString = GetConnString();  
    11             if (connString.StartsWith("http") == false)  
    12             {  
    13                 Console.WriteLine(String.Format("Connection string {0} should be in format http://servername:port for this to work", connString));  
    14                 return false;  
    15             }  
    16  
    17             Process process = new Process();  
    18             process.StartInfo.ErrorDialog = true;  
    19             process.StartInfo.FileName = String.Format("{0}/Currituck/WorkItem.aspx?artifactMoniker={1}", connString, id);  
    20             process.Start();  
    21  
    22             Console.WriteLine("Item opened in active IE window. For faster opening, make sure 'Automatically Detect Settings' is disabled in IE/Tools/Options/Connection/Lan settings");  
    23             return true;  
    24         } 

    Ed Blankenship, http://www.edsquared.com
    Tuesday, May 13, 2008 4:57 PM