コード例 #1
0
 public static void Main()
 {
     var           employee     = new Employee("worker");
     var           robot        = new Robot("01", 500);
     ISleeper      sleeper      = employee;
     IRechargeable rechargeable = robot;
 }
コード例 #2
0
 public void Recharge(IRechargeable rechargeable)
 {
     rechargeable.Recharge();
 }
コード例 #3
0
 public ChargingStation(IRechargeable rechargeables)
 {
 }
コード例 #4
0
 public ChargingStation(IRechargeable robot)
 {
 }
コード例 #5
0
 public ChargingStation(IRechargeable rechargeable)
 {
     this.rechargeable = rechargeable;
 }