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. General C# question

General C# question

Scheduled Pinned Locked Moved C#
questioncsharplounge
5 Posts 4 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.
  • C Offline
    C Offline
    cmh623
    wrote on last edited by
    #1

    What are some advantages of using Forms over MessageBoxes? And, is a return statement required in a method that returns the type void?

    C P 2 Replies Last reply
    0
    • C cmh623

      What are some advantages of using Forms over MessageBoxes? And, is a return statement required in a method that returns the type void?

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      cmh623 wrote:

      What are some advantages of using Forms over MessageBoxes?

      Well, the obvious one is that you can design a form any way you like, a MessageBox is very limited.

      cmh623 wrote:

      And, is a return statement required in a method that returns the type void?

      This is the sort of question where it would make sense to try it and so. The answer is no. You'd only use it to terminate execution based on a condition such as if (i <0) return;

      Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

      P 1 Reply Last reply
      0
      • C Christian Graus

        cmh623 wrote:

        What are some advantages of using Forms over MessageBoxes?

        Well, the obvious one is that you can design a form any way you like, a MessageBox is very limited.

        cmh623 wrote:

        And, is a return statement required in a method that returns the type void?

        This is the sort of question where it would make sense to try it and so. The answer is no. You'd only use it to terminate execution based on a condition such as if (i <0) return;

        Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        "Use the right tool for the right job." -- Scotty (among others) If you adopt the "Every method shall have one and only one return statement." ethic, as I have, then yes. (But the compiler makes the final decision.) ((And yield messes it up a bit.))

        C 1 Reply Last reply
        0
        • P PIEBALDconsult

          "Use the right tool for the right job." -- Scotty (among others) If you adopt the "Every method shall have one and only one return statement." ethic, as I have, then yes. (But the compiler makes the final decision.) ((And yield messes it up a bit.))

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          PIEBALDconsult wrote:

          ethic, as I have

          So have I, and that may have colored my response, but all I meant was, you can use it in the middle, but if it's not used around a condition, then the middle will become the end, and using it at the end, is pointless. Yes, I didn't confuse things by mentioning 'yield' :0)

          Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )

          1 Reply Last reply
          0
          • C cmh623

            What are some advantages of using Forms over MessageBoxes? And, is a return statement required in a method that returns the type void?

            P Offline
            P Offline
            Paul Conrad
            wrote on last edited by
            #5

            cmh623 wrote:

            some advantages of using Forms over MessageBoxes?

            You have better flexibility and control. Customization is far better with forms than messageboxes.

            "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

            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