Пример #1
0
        private void BtnSummarize_Click(object sender, EventArgs e)
        {
            decimal[] values = { numericUpDown1.Value, numericUpDown2.Value, numericUpDown3.Value };

            decimal max, min, avg, sum;

            MathMethods.Summarize(values, out max, out min, out avg, out sum);
            lblSummary.Text  = $"Sum: {sum}\n";
            lblSummary.Text += $"Min: {min}\n";
            lblSummary.Text += $"Max: {max}\n";
            lblSummary.Text += $"Average: {avg}";
        }
Пример #2
0
 private void NumericUpDown2_ValueChanged(object sender, EventArgs e)
 {
     lblSum.Text = $"Sum = {MathMethods.Add(numericUpDown1.Value, numericUpDown2.Value)}";
 }