Advertisement
wingman007

C#_OOP_4a_Program.cs

Apr 14th, 2014
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.47 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 App4a
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             // int counter = 0;
  14.             Human person1 = new Human("Stoyan", 50);
  15.             // counter++;
  16.             Human person2 = new Human(20, "Ivan");
  17.             // counter++;
  18.             Human person3 = new Human();
  19.             // counter++;
  20.  
  21.  
  22. //            person1.Name = "Stoyan";
  23. //            person1.Age = 50;
  24.  
  25. //            person2.Name = "Ivan";
  26. //            person2.Age = 20;
  27.  
  28.             // Console.WriteLine("My name is {0}. I am {1} years old!", person1.Name, person1.Age );
  29.             // Console.WriteLine("My name is {0}. I am {1} years old!", person2.Name, person2.Age);
  30.  
  31.             Human.nationality = "German";
  32.  
  33.             person1.IntroduceYourSelf("verbous");
  34.             person2.IntroduceYourSelf();
  35.             person3.IntroduceYourSelf();
  36.  
  37.             IncreasePopulation();
  38.  
  39.             Console.WriteLine("The population is {0}", Human.counter);
  40.  
  41.             Console.WriteLine(Human.PI);
  42.  
  43.             Console.WriteLine(person1.onlyRead);
  44.  
  45.             Console.WriteLine("Helo World!");
  46.             Console.Read();
  47.         }
  48.  
  49.         public static void IncreasePopulation()
  50.         {
  51.            //  int counter = 0;
  52.             Human person1 = new Human();
  53.             // counter++;
  54.         }
  55.     }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement