コード例 #1
0
        public static PensionContribution Create(decimal pensionContribution)
        {
            if (pensionContribution < 0 || pensionContribution > 100)
            {
                throw new BadInputException($"'{pensionContribution}' Pension Contribution must be between 0% and 100%");
            }

            return(new PensionContribution(Percent.Create(pensionContribution)));
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: dreysmal/Calculator
 private void persent_Click(Object sender, EventArgs e)
 {
     Percent?.Invoke(this, EventArgs.Empty);
     equals.Focus();
 }
コード例 #3
0
 private PensionContribution(Percent percent)
 {
     _percent = percent;
 }