Register for your free account! | Forgot your password?

You last visited: Today at 13:33

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Basics

Discussion on Basics within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2009
Posts: 49
Received Thanks: 3
Basics

Hey ich habe gerade angefangen C# zu lernen und kenn nun so die basic begriffe, wie z.B. int while loop if else void usw . . . .
doch jetzt stellen sich mir 2 fragen zudennen ich nciht wirklich eine antwort finden kann.

gibt es einen befehl fuer sleep bei C#? ich kann dort einfach keinen finden.
Und wie kann ich das fenster in einer Konsolenanwendung wieder bereinigen sprich das der Text geloescht wird. Als Notlösung koennte man es sicher so schreiben:

Console.WriteLine("\n\n\n\n\n\n\n\n\n\n\n")


aber das ist ja nicht der Sinn der Sache.
fishmix is offline  
Old 12/18/2009, 10:04   #2


 
buFFy!'s Avatar
 
elite*gold: 1826
Join Date: Mar 2009
Posts: 4,310
Received Thanks: 6,287
Ja den gibt es.

Sleep(10);
buFFy! is offline  
Old 12/18/2009, 12:02   #3
 
elite*gold: 0
Join Date: Feb 2008
Posts: 191
Received Thanks: 135
Quote:
Originally Posted by u-coRe View Post
Ja den gibt es.

Sleep(10);
The OP is asking about a function like Sleep in C#.
Answer: Thread.Sleep();

The second question is a bit more trivial. To clear the console in C# you should be able to use Console.Clear(); I think that function works from .NET 2.0 and on.
SuneC is offline  
Thanks
1 User
Old 12/18/2009, 12:21   #4


 
buFFy!'s Avatar
 
elite*gold: 1826
Join Date: Mar 2009
Posts: 4,310
Received Thanks: 6,287
Aber ganz ehrlich.. was hat das mit GuildWars zu tun?

#moved.
buFFy! is offline  
Old 12/18/2009, 21:28   #5
 
elite*gold: 0
Join Date: Jul 2009
Posts: 49
Received Thanks: 3
Hey

Quote:
Console.WriteLine("ich werde gleich geloescht");
Console.ReadKey();
Console.Clear();
Theard.Sleep();
Thanks. Console.Clear() works fine. But the command Theard. doesn't exist
fishmix is offline  
Old 12/18/2009, 21:36   #6

 
Adroxxx's Avatar
 
elite*gold: 15
Join Date: Nov 2005
Posts: 13,021
Received Thanks: 5,324
Quote:
Originally Posted by SuneC View Post
Thread.Sleep();
Quote:
Originally Posted by fishmix View Post
Hey


Thanks. Console.Clear() works fine. But the command Theard. doesn't exist
Omg dude learn to read. Srsly.
Adroxxx is offline  
Old 12/18/2009, 23:33   #7
 
Shadowz75's Avatar
 
elite*gold: 0
Join Date: Mar 2009
Posts: 443
Received Thanks: 597
Quote:
Originally Posted by fishmix View Post
Hey


Thanks. Console.Clear() works fine. But the command Theard. doesn't exist
Add this on the top:
using System.Threading;
Shadowz75 is offline  
Thanks
1 User
Old 12/19/2009, 02:00   #8
 
elite*gold: 0
Join Date: Jul 2009
Posts: 49
Received Thanks: 3
omfg dude. was hat es damit auf sich, wenn man sich hier im Forum verschreibt, und dan nur einen zeichendreher macht.

Thread.Sleep() funktioniert nicht, auch wenn es richtig geschrieben ist.

Thanks for hel shadowz. Sometimes, I ask me if the wrong persons are mods . . .
fishmix is offline  
Old 12/19/2009, 09:50   #9

 
Adroxxx's Avatar
 
elite*gold: 15
Join Date: Nov 2005
Posts: 13,021
Received Thanks: 5,324
Quote:
Originally Posted by fishmix View Post
omfg dude. was hat es damit auf sich, wenn man sich hier im Forum verschreibt, und dan nur einen zeichendreher macht.

Thread.Sleep() funktioniert nicht, auch wenn es richtig geschrieben ist.

Thanks for hel shadowz. Sometimes, I ask me if the wrong persons are mods . . .


Wenn du bei beiden Wörter es genau gleich falsch schreibst, kommt sehr schnell die Vermutung auf, dass du es im Quelltext genauso falsch hast.

PHP Code:
System.Threading.Thread.Sleep500 ); 
Adroxxx is offline  
Old 12/19/2009, 11:16   #10


 
Cholik's Avatar
 
elite*gold: 4
Join Date: Aug 2008
Posts: 6,783
Received Thanks: 4,992
BÄM
Cholik is offline  
Reply


Similar Threads Similar Threads
GFX-Basics - Things You Should Know
12/15/2012 - Artist Tutorials - 27 Replies
I found this in the depths of the web and saw quite some of the aspects that I feel are missing for the most artists here. It's not made by me, the author gives permission to post it along with a credit --> Zenron ======= Ich hab das hier in den Weiten des Internets gefunden und sehe darin viele Dinge, die ich bei vielen der Künstler hier vermisse, aber nicht immer in Worte fassen kann. Das Tutorial ist nicht von mir, der Autor gibt aber die Erlaubnis, das Tutorial zusammen mit seinen...
PHP und MySQL Basics
02/15/2010 - Coding Tutorials - 4 Replies
PHP und MySQL Basics Hattet ihr euch schon längere Zeit vorgenommen PHP zu lernen, hattet aber keine Möglichkeit richtig ins Thema zu kommen? Für alle PHP-Anfäger werde ich nun ein kleines Tutorial schreiben, welches das Erstellen von Datenbanken (bzw Tabellen) und das Benutzen selbiger mit PHP erklärt. Vorwissen hierzu ist nicht benötigt, könnte sich jedoch positiv auf die Arbeitsschritte auswirken. .: Voraussetzungen :. - Webspace mit einer vorinstallierten Datenbank (für dieses Tut...
Basics of WPE
06/18/2009 - World of Warcraft - 1 Replies
can anyone explain what does 1. Offset 2. Search 3. Modify means. Pls explain giving examples from 2.4.3 (duping stackable items) hack. Need to learn how the software works. I'll be making my own hack later :)
The Basics... And A Thanks
12/27/2007 - CO2 Guides & Templates - 6 Replies
My second contribution to this forum. Hopefully some find it useful, to anyone that already knows this or uses the programs please don't flame as obviously this wasn't meant for you. This is made for a people who have just started using programs from this site and need a little help. What you need: (starting out) 1) Item identifier (Get it Here) *Shows quality of items on the ground, will not show + items or blessed items, for those you will still have to check items manually. This...
[WoW]Basics zum Ersten, Basics zum Zweiten...
08/12/2004 - User Submitted News - 0 Replies



All times are GMT +1. The time now is 13:33.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.