overloading Console.write() [modified]
-
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
-
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
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
-
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
-
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) -*-*-*-*-*-*-*-*-*
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
-
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
Don't repeat your question. Remove the one above before some replies to it
I know the language. I've read a book. - _Madmatt
-
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
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
-
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
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:
-
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:
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.
-
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.
-
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 :)
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.
-
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:
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.
-
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.