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. [Message Deleted]

[Message Deleted]

Scheduled Pinned Locked Moved C#
11 Posts 2 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.
  • A Amangang

    [Message Deleted]

    A Offline
    A Offline
    Amangang
    wrote on last edited by
    #2

    Sorry i think that part of the code was a shorcut to some imoticon Aman

    1 Reply Last reply
    0
    • A Amangang

      [Message Deleted]

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #3

      Hi, you need some variables when reading from the console. Here is a way to get a number (note the use of PRE tags for readability):

      Console.WriteLine("please enter number:");
      string s=Console.ReadLine();
      int number;
      bool OK=int.TryParse(s, out number);
      if (OK) {
      Console.WriteLine("You entered the number "+number);
      } else {
      Console.WriteLine("Unacceptable input: "+s);
      }

      :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


      A 1 Reply Last reply
      0
      • L Luc Pattyn

        Hi, you need some variables when reading from the console. Here is a way to get a number (note the use of PRE tags for readability):

        Console.WriteLine("please enter number:");
        string s=Console.ReadLine();
        int number;
        bool OK=int.TryParse(s, out number);
        if (OK) {
        Console.WriteLine("You entered the number "+number);
        } else {
        Console.WriteLine("Unacceptable input: "+s);
        }

        :)

        Luc Pattyn [Forum Guidelines] [My Articles]


        The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


        A Offline
        A Offline
        Amangang
        wrote on last edited by
        #4

        Dear Luc Pattyn, Thank you very much for your help, however the brackets are still red and the error message is still there. Thank you very much for oyur help and sorry for the inconvenience, Aman

        L 1 Reply Last reply
        0
        • A Amangang

          Dear Luc Pattyn, Thank you very much for your help, however the brackets are still red and the error message is still there. Thank you very much for oyur help and sorry for the inconvenience, Aman

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #5

          Hi, what brackets? do you mean the parentheses? did you put your code inside a method, the method inside a class, the class inside a namespace? if there is an error message, give it as is. if it specifies a line number, check that line. work on the first error message first. and teach your IDE to always show line numbers, see #102 here[^] :)

          Luc Pattyn [Forum Guidelines] [My Articles]


          The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


          A 1 Reply Last reply
          0
          • L Luc Pattyn

            Hi, what brackets? do you mean the parentheses? did you put your code inside a method, the method inside a class, the class inside a namespace? if there is an error message, give it as is. if it specifies a line number, check that line. work on the first error message first. and teach your IDE to always show line numbers, see #102 here[^] :)

            Luc Pattyn [Forum Guidelines] [My Articles]


            The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


            A Offline
            A Offline
            Amangang
            wrote on last edited by
            #6

            Dear Luc Pattyn, I have fixed this problem, the problem was that one of the settings for c# was changed. I dont know how that happened. I just reset all the settings to default and that worked. Thank you very much for helping, Aman

            L 1 Reply Last reply
            0
            • A Amangang

              [Message Deleted]

              A Offline
              A Offline
              Amangang
              wrote on last edited by
              #7

              THIS PROBLEM IS FIXED. I would like to thank everybody that offered solutions and tried to help, Aman

              1 Reply Last reply
              0
              • A Amangang

                Dear Luc Pattyn, I have fixed this problem, the problem was that one of the settings for c# was changed. I dont know how that happened. I just reset all the settings to default and that worked. Thank you very much for helping, Aman

                L Offline
                L Offline
                Luc Pattyn
                wrote on last edited by
                #8

                Hi Aman, you're welcome. BTW: Please don't delete any messages, they should remain visible to keep the thread intelligible and available for future reference. :)

                Luc Pattyn [Forum Guidelines] [My Articles]


                The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


                A 1 Reply Last reply
                0
                • L Luc Pattyn

                  Hi Aman, you're welcome. BTW: Please don't delete any messages, they should remain visible to keep the thread intelligible and available for future reference. :)

                  Luc Pattyn [Forum Guidelines] [My Articles]


                  The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


                  A Offline
                  A Offline
                  Amangang
                  wrote on last edited by
                  #9

                  Hi Luc, Right sorry i just thought that if i kept it open people would have thought that this is still a issue/problem. I did not know that you where ment to keep it open , thank you for telling me i now know :) Thank you, Aman

                  L 1 Reply Last reply
                  0
                  • A Amangang

                    Hi Luc, Right sorry i just thought that if i kept it open people would have thought that this is still a issue/problem. I did not know that you where ment to keep it open , thank you for telling me i now know :) Thank you, Aman

                    L Offline
                    L Offline
                    Luc Pattyn
                    wrote on last edited by
                    #10

                    What you can do is: - add "(SOLVED)" to the subject line of the original post - click "good answer" on the reply that did it for you (that removes it from the "unanswered questions" list) :)

                    Luc Pattyn [Forum Guidelines] [My Articles]


                    The quality and detail of your question reflects on the effectiveness of the help you are likely to get. Show formatted code inside PRE tags, and give clear symptoms when describing a problem.


                    1 Reply Last reply
                    0
                    • A Amangang

                      [Message Deleted]

                      A Offline
                      A Offline
                      Amangang
                      wrote on last edited by
                      #11

                      Thank you all for helping me solve this simple problem, i did not realise that my settings had been changed, Aman

                      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