Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Code Insertion Syntax Query

Code Insertion Syntax Query

Scheduled Pinned Locked Moved C#
csharpdatabasevisual-studiohelplearning
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mauricemcse
    wrote on last edited by
    #1

    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

    L B A 3 Replies Last reply
    0
    • M mauricemcse

      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

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • M mauricemcse

        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

        B Offline
        B Offline
        Big Daddy Farang
        wrote on last edited by
        #3

        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

        M 1 Reply Last reply
        0
        • M mauricemcse

          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

          A Offline
          A Offline
          Abhinav S
          wrote on last edited by
          #4

          As mentioned, these are the default colors for the text editor. You can always change and customize these colors as described here[^].

          1 Reply Last reply
          0
          • B Big Daddy Farang

            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

            M Offline
            M Offline
            mauricemcse
            wrote on last edited by
            #5

            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

            E B 2 Replies Last reply
            0
            • M 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

              E Offline
              E Offline
              Ennis Ray Lynch Jr
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              • M 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

                B Offline
                B Offline
                Big Daddy Farang
                wrote on last edited by
                #7

                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

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups