RSS Forums RSS
Please support our C# advertiser: Programming Forums
Views: 1782 | Replies: 6 | Solved | Thread Tools  Display Modes
Reply
Join Date: Oct 2007
Location: South coast UK
Posts: 23
Reputation: FallenPaladin is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
FallenPaladin FallenPaladin is offline Offline
Newbie Poster

Question c# Console

  #1  
Oct 30th, 2007
Hi, I am currently studying programing, and have become some what stumped with Visual studio 2003. I have written a number of application using the console, however currently i am trying to clear of text that has already been written to the console.....but can not find any command or code to do such.

So I was woundering if it is possible, and if so why is there not a simple command to do so.

Would be greatful for any help or suggestions.

Thank you
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2004
Location: Tracy
Posts: 744
Reputation: Killer_Typo will become famous soon enough Killer_Typo will become famous soon enough 
Rep Power: 7
Solved Threads: 32
Killer_Typo's Avatar
Killer_Typo Killer_Typo is offline Offline
Master Poster

Re: c# Console

  #2  
Oct 31st, 2007
System.Console.Clear();
!!!!! WARNING YOUR COMPUTER MAY BE INFECTED WITH SPYWARE!!!! PAY AN OVER PRICED AMMOUNT TO HAVE SOMTHING FIXED WE PLACED THERE IN THE FIRST PLACE!!!!!!!!!

sound familiar, know how to block yourself and keep yourself clean.
_____________________
http://www.lavasoftusa.com/ -->adaware
http://www.safer-networking.org/en/index.html -->spybot S&D
http://www.javacoolsoftware.com/spywareblaster.html -->spywareblaster
http://www.javacoolsoftware.com/spywareguard.html -->spywareguard
_____________________
and dont forget to spread the reputation to those that deserve!
Reply With Quote  
Join Date: Oct 2007
Location: South coast UK
Posts: 23
Reputation: FallenPaladin is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
FallenPaladin FallenPaladin is offline Offline
Newbie Poster

Re: c# Console

  #3  
Oct 31st, 2007
hi, thanks for your reply.............is it really that simple? Thanks
Reply With Quote  
Join Date: Apr 2004
Location: Tracy
Posts: 744
Reputation: Killer_Typo will become famous soon enough Killer_Typo will become famous soon enough 
Rep Power: 7
Solved Threads: 32
Killer_Typo's Avatar
Killer_Typo Killer_Typo is offline Offline
Master Poster

Re: c# Console

  #4  
Oct 31st, 2007
Originally Posted by FallenPaladin View Post
hi, thanks for your reply.............is it really that simple? Thanks


why not give it a shot

System.Console.WriteLine("hello world");
System.Console.clear();
System.Console.WriteLine("Hello world again");

give it a shot.
!!!!! WARNING YOUR COMPUTER MAY BE INFECTED WITH SPYWARE!!!! PAY AN OVER PRICED AMMOUNT TO HAVE SOMTHING FIXED WE PLACED THERE IN THE FIRST PLACE!!!!!!!!!

sound familiar, know how to block yourself and keep yourself clean.
_____________________
http://www.lavasoftusa.com/ -->adaware
http://www.safer-networking.org/en/index.html -->spybot S&D
http://www.javacoolsoftware.com/spywareblaster.html -->spywareblaster
http://www.javacoolsoftware.com/spywareguard.html -->spywareguard
_____________________
and dont forget to spread the reputation to those that deserve!
Reply With Quote  
Join Date: Oct 2007
Location: South coast UK
Posts: 23
Reputation: FallenPaladin is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
FallenPaladin FallenPaladin is offline Offline
Newbie Poster

Re: c# Console

  #5  
Oct 31st, 2007
hi there have tried the .clear() statement, however it is not recognised as a valid command within the c# console application component of visual studio 2003. Is there anything else?
Reply With Quote  
Join Date: Apr 2004
Location: Tracy
Posts: 744
Reputation: Killer_Typo will become famous soon enough Killer_Typo will become famous soon enough 
Rep Power: 7
Solved Threads: 32
Killer_Typo's Avatar
Killer_Typo Killer_Typo is offline Offline
Master Poster

Re: c# Console

  #6  
Oct 31st, 2007
check out http://support.microsoft.com/kb/319257

it really should be as simple as Console.Clear()
!!!!! WARNING YOUR COMPUTER MAY BE INFECTED WITH SPYWARE!!!! PAY AN OVER PRICED AMMOUNT TO HAVE SOMTHING FIXED WE PLACED THERE IN THE FIRST PLACE!!!!!!!!!

sound familiar, know how to block yourself and keep yourself clean.
_____________________
http://www.lavasoftusa.com/ -->adaware
http://www.safer-networking.org/en/index.html -->spybot S&D
http://www.javacoolsoftware.com/spywareblaster.html -->spywareblaster
http://www.javacoolsoftware.com/spywareguard.html -->spywareguard
_____________________
and dont forget to spread the reputation to those that deserve!
Reply With Quote  
Join Date: Oct 2007
Location: South coast UK
Posts: 23
Reputation: FallenPaladin is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
FallenPaladin FallenPaladin is offline Offline
Newbie Poster

Solution Re: c# Console

  #7  
Nov 1st, 2007
Hi there, thanks again......it apears that you have to creat a new instance (??) by declaring the console as a variable then clear the variable.........i keep forgetting that everything is an object .

Thanks
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 3:38 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC