C#'s version or clrscr() ??? 
Author Message
 C#'s version or clrscr() ???

anyone know how to clear the screen in the console?
in C its clrscr()
in MS C++ used to be System("cls");

how do i do the same in C# ?
thanks



Wed, 06 Oct 2004 07:17:06 GMT  
 C#'s version or clrscr() ???
Alexander,

Quote:
>anyone know how to clear the screen in the console?
>in C its clrscr()
>in MS C++ used to be System("cls");

>how do i do the same in c# ?

HOW TO: Clear the Console Window with Visual C# .NET
http://support.microsoft.com/default.aspx?scid=kb;;q319257

Mattias

===
Mattias Sj?gren (VB MVP)

http://www.msjogren.net/dotnet/



Wed, 06 Oct 2004 08:29:14 GMT  
 C#'s version or clrscr() ???
After reading that article, I hope someone adds something like
System.Console.ClearScreen();
to the next version of the Framework!


Quote:
> Alexander,

> >anyone know how to clear the screen in the console?
> >in C its clrscr()
> >in MS C++ used to be System("cls");

> >how do i do the same in c# ?

> HOW TO: Clear the Console Window with Visual C# .NET
> http://support.microsoft.com/default.aspx?scid=kb;;q319257

> Mattias

> ===
> Mattias Sj?gren (VB MVP)

> http://www.msjogren.net/dotnet/



Wed, 06 Oct 2004 09:17:43 GMT  
 C#'s version or clrscr() ???
thanks, but u got to be kidding me, PLEASE u micosoft guys take note of this
and fix this in the servicepack, lets not wait for version 2;
thanks


Quote:
> anyone know how to clear the screen in the console?
> in C its clrscr()
> in MS C++ used to be System("cls");

> how do i do the same in c# ?
> thanks



Wed, 06 Oct 2004 10:53:49 GMT  
 C#'s version or clrscr() ???
I think the Console class is simply misnamed - there is nothing in it that
has anything specific to do with consoles. It merely encapsulates the
standard input, output and error streams, regardless of whether they are
attached to a console. There is nothing that states that a Console.WriteLine
_always_ has to go to a console window - it could be piped to another
program or redirected to a file. How would a ClearScreen() method work in
that case?
StdIO or something like that would be a better name for this class, IMHO.
You also have to be aware that the situation is the same for other
languages - C++ iostreams have no concept of the console either, nor does
Java's System.(in | out | err). The system("cls") hack has nothing to do
with C++ as such, it merely uses a command thats built into the Windows
command shell. The proper way to deal with the console in a win32
application has always been through the Win32 console functions.

--
Arild Fines

- The computer was conceived as a tool to reduce complexity. Some people
found this loss of complexity unacceptable, and developed UNIX to
reintroduce it.



Wed, 06 Oct 2004 21:16:08 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. How to 'clrscr'

2. Newbie: separate big .cs file into small .cs files

3. Can't retrieve cookies in .cs file, but works in aspx page

4. Debug version works, Release version doesn't

5. Debug version works, Release version doesn't

6. Link user DLL's with 16 bits version VC++ vs 32 bits version

7. Announce: `` v '', the Non Standard C Library (version 0.2)

8. Annonce: `` v '', the Non Standard C Library (version 0.0)

9. 'Money wanted' algorithm (Cobol version)

10. C version of Unix 'tee'

11. MS Visual 'C' version 2.0

12. MS Visual 'C' version 2.0

 

 
Powered by phpBB® Forum Software