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#
4 Posts 3 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.
  • L Offline
    L Offline
    Laddie
    wrote on last edited by
    #1

    [Message Deleted]

    M G 2 Replies Last reply
    0
    • L Laddie

      [Message Deleted]

      M Offline
      M Offline
      Matthew Butler 0
      wrote on last edited by
      #2

      Hi, (condition ? result_if_true : result_if_false) represents a value... Console.WriteLine(x > y ? "X bigger" : "Y bigger (or equal to)"); is what you're looking for (note that if x > y is false... it doesn't necessarily mean that y > x). Hope this helps.

      Matthew Butler

      L 1 Reply Last reply
      0
      • M Matthew Butler 0

        Hi, (condition ? result_if_true : result_if_false) represents a value... Console.WriteLine(x > y ? "X bigger" : "Y bigger (or equal to)"); is what you're looking for (note that if x > y is false... it doesn't necessarily mean that y > x). Hope this helps.

        Matthew Butler

        L Offline
        L Offline
        Laddie
        wrote on last edited by
        #3

        Hi Matthew, Thanks for the reply. I should be dumb .I forgot the thing." Assignment of result" Any way thanks for your time

        Thanks Laddie Kindly rate if the answer was helpful

        1 Reply Last reply
        0
        • L Laddie

          [Message Deleted]

          G Offline
          G Offline
          GuyThiebaut
          wrote on last edited by
          #4

          Yuo are calling the WriteLine method of Console which is not an:

          Laddie wrote:

          assignment,call,increment, decrement, and new object expressions

          Try: if (x > y) { Console.WriteLine("x is greater"); } else { Console.WriteLine("y is greater"); }

          You always pass failure on the way to success.
          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