wingman007

2015_OOP_Features_Executor

May 27th, 2015
548
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 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 World1
  8. {
  9.     class Executor
  10.     {
  11.         private IIntroducable entity;
  12.  
  13.         public IIntroducable Entity
  14.         {
  15.             get { return entity; }
  16.             set { entity = value; }
  17.         }
  18.  
  19.         public Executor(IIntroducable entity)
  20.         {
  21.             this.entity = entity;
  22.         }
  23.  
  24.         public void MakeHimSpeak()
  25.         {
  26.             Console.WriteLine("================= hahahah I will make you speak! ========");
  27.             entity.IntroduceYourSelf();
  28.             Console.WriteLine("================ Hahaha! I told you!!! ===============");
  29.         }
  30.     }
  31. }
Add Comment
Please, Sign In to add comment