//Method that set next handler in the pipeline public CurrencyBill RegisterNext(CurrencyBill currencyBill) { next = currencyBill; return(next); }
//A static constructor that initializes static Zero property //This property is used as default next handler instead of a null object static CurrencyBill()//静态构造函数的用法 { Zero = new ZeroCurrencyBill(); }