Advertisement
wingman007

C#_OOP_3b_Program.cs

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