Difference between revisions of "Console writing and sleeping"

From MyWiki
Jump to: navigation, search
Line 10: Line 10:
 
     {
 
     {
 
char[] array = new char[] { 'a', 'b', 'c', 'd' };
 
char[] array = new char[] { 'a', 'b', 'c', 'd' };
//
+
##
// Write the entire char array on a new line.
+
## Write the entire char array on a new line.
 
//
 
//
 
Console.WriteLine(array);
 
Console.WriteLine(array);

Revision as of 12:58, 23 June 2014

           Console.Write("adsfasdf");
           System.Threading.Thread.Sleep(5000);
           Console.WriteLine("adsfasdfadsfdasfasfd");
Program that uses Console.WriteLine with arrays: C#
using System;
class Program
{
   static void Main()
   {

char[] array = new char[] { 'a', 'b', 'c', 'd' }; ## ## Write the entire char array on a new line. // Console.WriteLine(array); // // Write the middle 2 characters on a new line. // Console.WriteLine(array, 1, 2);

   }
}