Code Insertion Syntax Query
-
Presently working with C# programming book and using Visual Studio 2008 Tem Suite. One exercise requires that I insert the text: MessageBox.Show ("Contact List 1.0. \nWritten by: Your Name", "About"); Although I have done this once successfully, I have not been able to repeat because the text within the parentheses is now shown in RED. The message box appears containing the notification "ClassSystem.String Represents text as a series of Unicode characters" I am a novice and have tried to search this but have not found information to correct this issue. Guidance sought
-
Presently working with C# programming book and using Visual Studio 2008 Tem Suite. One exercise requires that I insert the text: MessageBox.Show ("Contact List 1.0. \nWritten by: Your Name", "About"); Although I have done this once successfully, I have not been able to repeat because the text within the parentheses is now shown in RED. The message box appears containing the notification "ClassSystem.String Represents text as a series of Unicode characters" I am a novice and have tried to search this but have not found information to correct this issue. Guidance sought
mauricemcse wrote:
MessageBox.Show ("Contact List 1.0. \nWritten by: Your Name", "About");
There is nothing wrong with this code.
mauricemcse wrote:
I have not been able to repeat because the text within the parentheses is now shown in RED.
It's red by default. It's called "syntax coloring" so you can easily see that the item is a string. If you do not like the red color, you can change it from your Tools->Options menu item.
Why is common sense not common? Never argue with an idiot. They will drag you down to their level where they are an expert. Sometimes it takes a lot of work to be lazy Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
-
Presently working with C# programming book and using Visual Studio 2008 Tem Suite. One exercise requires that I insert the text: MessageBox.Show ("Contact List 1.0. \nWritten by: Your Name", "About"); Although I have done this once successfully, I have not been able to repeat because the text within the parentheses is now shown in RED. The message box appears containing the notification "ClassSystem.String Represents text as a series of Unicode characters" I am a novice and have tried to search this but have not found information to correct this issue. Guidance sought
The text being shown in red is just Visual Studio's way of telling you that it is a literal string. MessageBox is a light blue because it's a class. Show is black because it's a function, and so on. The "Class System.String..." message that appears when you hold the mouse pointer over it is Visual Studio telling you about Strings. If you hold the mouse over MessageBox or over Show you will see other helpful messages about them. What issue is it that you are trying to correct?
BDF I often make very large prints from unexposed film, and every one of them turns out to be a picture of myself as I once dreamed I would be. -- BillWoodruff
-
Presently working with C# programming book and using Visual Studio 2008 Tem Suite. One exercise requires that I insert the text: MessageBox.Show ("Contact List 1.0. \nWritten by: Your Name", "About"); Although I have done this once successfully, I have not been able to repeat because the text within the parentheses is now shown in RED. The message box appears containing the notification "ClassSystem.String Represents text as a series of Unicode characters" I am a novice and have tried to search this but have not found information to correct this issue. Guidance sought
-
The text being shown in red is just Visual Studio's way of telling you that it is a literal string. MessageBox is a light blue because it's a class. Show is black because it's a function, and so on. The "Class System.String..." message that appears when you hold the mouse pointer over it is Visual Studio telling you about Strings. If you hold the mouse over MessageBox or over Show you will see other helpful messages about them. What issue is it that you are trying to correct?
BDF I often make very large prints from unexposed film, and every one of them turns out to be a picture of myself as I once dreamed I would be. -- BillWoodruff
The first attempt at the code insertion did not demonstrate a red font and so when the exercise was repeated I assumed the red font was an indication of a problem. I have visited other forums where such queries are met with hostility or ridicule. I am truly appreciative of the responses I get here. Cordially, mauriceMCSE
-
The first attempt at the code insertion did not demonstrate a red font and so when the exercise was repeated I assumed the red font was an indication of a problem. I have visited other forums where such queries are met with hostility or ridicule. I am truly appreciative of the responses I get here. Cordially, mauriceMCSE
Depends on the question here -- and timing.
Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost
-
The first attempt at the code insertion did not demonstrate a red font and so when the exercise was repeated I assumed the red font was an indication of a problem. I have visited other forums where such queries are met with hostility or ridicule. I am truly appreciative of the responses I get here. Cordially, mauriceMCSE
It's strange that the first attempt wasn't colored red. Best not to waste time trying to figure out why not, I suppose. I wish you success in your future coding exercises.
BDF I often make very large prints from unexposed film, and every one of them turns out to be a picture of myself as I once dreamed I would be. -- BillWoodruff