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. overloading Console.write() [modified]

overloading Console.write() [modified]

Scheduled Pinned Locked Moved C#
tutorial
12 Posts 8 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.
  • K KARFER

    Hi all how to do function like Console.write() but without using Console.write() and with different name. I want to say how to create a print function without using Console.write() and name it as you like. I hear that i can do it by overloading or overriding or anything else .. i don't know. Thank's

    -*-*-*-*-*-*-*-*-* To Be Or Not To Be (KARFER) -*-*-*-*-*-*-*-*-*

    modified on Tuesday, February 1, 2011 11:50 AM

    P Offline
    P Offline
    Pete OHanlon
    wrote on last edited by
    #2

    So, you want to write a new method that does exactly the same as the old method. Is that what you're saying? You could always open up the Console class in Reflector and see what Write (and WriteLine) is doing, and use that as the basis of your code.

    I'm not a stalker, I just know things. Oh by the way, you're out of milk.

    Forgive your enemies - it messes with their heads

    My blog | My articles | MoXAML PowerToys | Onyx

    K 1 Reply Last reply
    0
    • P Pete OHanlon

      So, you want to write a new method that does exactly the same as the old method. Is that what you're saying? You could always open up the Console class in Reflector and see what Write (and WriteLine) is doing, and use that as the basis of your code.

      I'm not a stalker, I just know things. Oh by the way, you're out of milk.

      Forgive your enemies - it messes with their heads

      My blog | My articles | MoXAML PowerToys | Onyx

      K Offline
      K Offline
      KARFER
      wrote on last edited by
      #3

      Thank's for reply but i want to say how to make new method like Console.write by overloading without using Console.write.

      -*-*-*-*-*-*-*-*-* To Be Or Not To Be (KARFER) -*-*-*-*-*-*-*-*-*

      P 1 Reply Last reply
      0
      • K KARFER

        Thank's for reply but i want to say how to make new method like Console.write by overloading without using Console.write.

        -*-*-*-*-*-*-*-*-* To Be Or Not To Be (KARFER) -*-*-*-*-*-*-*-*-*

        P Offline
        P Offline
        Pete OHanlon
        wrote on last edited by
        #4

        I already told you how to do it. Open Console.Write up and have a look at how it does it.

        I'm not a stalker, I just know things. Oh by the way, you're out of milk.

        Forgive your enemies - it messes with their heads

        My blog | My articles | MoXAML PowerToys | Onyx

        1 Reply Last reply
        0
        • K KARFER

          Hi all how to do function like Console.write() but without using Console.write() and with different name. I want to say how to create a print function without using Console.write() and name it as you like. I hear that i can do it by overloading or overriding or anything else .. i don't know. Thank's

          -*-*-*-*-*-*-*-*-* To Be Or Not To Be (KARFER) -*-*-*-*-*-*-*-*-*

          modified on Tuesday, February 1, 2011 11:50 AM

          N Offline
          N Offline
          Not Active
          wrote on last edited by
          #5

          Don't repeat your question. Remove the one above before some replies to it


          I know the language. I've read a book. - _Madmatt

          1 Reply Last reply
          0
          • K KARFER

            Hi all how to do function like Console.write() but without using Console.write() and with different name. I want to say how to create a print function without using Console.write() and name it as you like. I hear that i can do it by overloading or overriding or anything else .. i don't know. Thank's

            -*-*-*-*-*-*-*-*-* To Be Or Not To Be (KARFER) -*-*-*-*-*-*-*-*-*

            modified on Tuesday, February 1, 2011 11:50 AM

            T Offline
            T Offline
            TheGreatAndPowerfulOz
            wrote on last edited by
            #6

            are you wanting to output to the console?

            "If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams

            1 Reply Last reply
            0
            • K KARFER

              Hi all how to do function like Console.write() but without using Console.write() and with different name. I want to say how to create a print function without using Console.write() and name it as you like. I hear that i can do it by overloading or overriding or anything else .. i don't know. Thank's

              -*-*-*-*-*-*-*-*-* To Be Or Not To Be (KARFER) -*-*-*-*-*-*-*-*-*

              modified on Tuesday, February 1, 2011 11:50 AM

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

              KARFER wrote:

              I want to say how to create a print function without using Console.write() and name it as you like.

              In what language would you want that, C, C# or C++?

              KARFER wrote:

              I hear that i can do it by overloading or overriding or anything else .. i don't know.

              Well, you can create methods and name 'em however you want, and they can do whatever you want. Problem is often describing what one wants. Try giving a more detailed example on what you're trying to accomplish :)

              I are Troll :suss:

              F H 2 Replies Last reply
              0
              • L Lost User

                KARFER wrote:

                I want to say how to create a print function without using Console.write() and name it as you like.

                In what language would you want that, C, C# or C++?

                KARFER wrote:

                I hear that i can do it by overloading or overriding or anything else .. i don't know.

                Well, you can create methods and name 'em however you want, and they can do whatever you want. Problem is often describing what one wants. Try giving a more detailed example on what you're trying to accomplish :)

                I are Troll :suss:

                F Offline
                F Offline
                fjdiewornncalwe
                wrote on last edited by
                #8

                Eddy Vluggen wrote:

                In what language would you want that, C, C# or C++?

                I feel obliged to draw your attention to the Forum name, Eddy... :)

                I wasn't, now I am, then I won't be anymore.

                L 1 Reply Last reply
                0
                • F fjdiewornncalwe

                  Eddy Vluggen wrote:

                  In what language would you want that, C, C# or C++?

                  I feel obliged to draw your attention to the Forum name, Eddy... :)

                  I wasn't, now I am, then I won't be anymore.

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

                  Marcus Kramer wrote:

                  I feel obliged to draw your attention to the Forum name, Eddy

                  This isn't my forum, it's the C# forum :-\ He's cross-posting, making me wonder what kind of textbook he's reading to come up with a question like this :)

                  L 1 Reply Last reply
                  0
                  • L Lost User

                    Marcus Kramer wrote:

                    I feel obliged to draw your attention to the Forum name, Eddy

                    This isn't my forum, it's the C# forum :-\ He's cross-posting, making me wonder what kind of textbook he's reading to come up with a question like this :)

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

                    We can only wish he would start studying a book rather than ask random questions. :)

                    Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum

                    Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

                    1 Reply Last reply
                    0
                    • L Lost User

                      KARFER wrote:

                      I want to say how to create a print function without using Console.write() and name it as you like.

                      In what language would you want that, C, C# or C++?

                      KARFER wrote:

                      I hear that i can do it by overloading or overriding or anything else .. i don't know.

                      Well, you can create methods and name 'em however you want, and they can do whatever you want. Problem is often describing what one wants. Try giving a more detailed example on what you're trying to accomplish :)

                      I are Troll :suss:

                      H Offline
                      H Offline
                      Henry Minute
                      wrote on last edited by
                      #11

                      Eddy Vluggen wrote:

                      In what language would you want that, C, C# or C++?

                      You forgot Visual Basic and PHP.

                      Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

                      L 1 Reply Last reply
                      0
                      • H Henry Minute

                        Eddy Vluggen wrote:

                        In what language would you want that, C, C# or C++?

                        You forgot Visual Basic and PHP.

                        Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.” I wouldn't let CG touch my Abacus! When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is.

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

                        Henry Minute wrote:

                        You forgot Visual Basic and PHP

                        Why, did he also crosspost in the interpreter-fora? :)

                        I are Troll :suss:

                        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