コード例 #1
0
        private static decimal CalculateFee(decimal amount, WithDrawType type)
        {
            switch (type)
            {
            case WithDrawType.Transfer:
                return(amount * .10m);

            case WithDrawType.Withdrawal:
                return(amount * .05m);

            default:
                return(0);
            }
        }
コード例 #2
0
ファイル: IBankAccount.cs プロジェクト: Neptuned/Week-5-Day-3
 private static decimal CalculateFee(decimal amount, WithDrawType type)
 {
     switch (type)
     {
         case WithDrawType.Transfer:
             return amount * .10m;
         case WithDrawType.Withdrawal:
             return amount * .05m;
         default:
             return 0;
     }
 }