Example #1
0
    public static void Main()
    {
        Tank       tank = new T50();
        DecoratorA da   = new DecoratorA(tank);

        da.Shot();
        DacoratorB db = new DecoratorB(da);

        db.Run();
        DacoratorC dc = new Decorator(dc);

        dc.Run();
    }
Example #2
0
 static bool Do50(T50 t) {
   Nullable<T50> n = new Nullable<T50>(t);
   return Ensure(n.HasValue && n.Value == t);
 }