Advertisement
wingman007

2018MIITTreeProgramClassObjectStatic

Apr 19th, 2018
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 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 Forest1
  8. {
  9.   class Program
  10.   {
  11.     static void Main(string[] args)
  12.     {
  13.       Tree tree1 = new Tree("Ela", 2.3, 12.1);
  14.       Tree tree2 = new Tree(1.2, "Bor", 5.4);
  15.       Tree tree3 = new Tree();
  16.  
  17.       tree1.Introduice();
  18.       tree2.Introduice();
  19.       tree3.Introduice();
  20.  
  21.       Tree.Color = "Yellow";
  22.  
  23.       tree1.Introduice();
  24.       tree2.Introduice();
  25.       tree3.Introduice();
  26.  
  27.       Console.WriteLine("The number of instances = {0}", Tree.Counter);
  28.     }
  29.   }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement