Advertisement
Felanpro

little program possible by methods and while loop

Aug 9th, 2016
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.92 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace csharp_youtube_tutorial
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             application_set_window();
  14.             application_set_foreground_color();
  15.  
  16.             int x = 0;
  17.  
  18.             while (x <= 11)
  19.             {
  20.                 Console.WriteLine("Application message!!!!");
  21.                 x++; //Increment operator. x += 1 basically.
  22.             }
  23.  
  24.             Console.ReadKey(); //Press a key application ends. //Console[Class] ReadKey()[Function/Method]  
  25.         }
  26.  
  27.         public static void application_set_window()
  28.         {
  29.             Console.SetWindowSize(100, 40);
  30.         }
  31.  
  32.         public static void application_set_foreground_color()
  33.         {
  34.             Console.ForegroundColor = ConsoleColor.Red;
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement