1 ==============加法类================
 2 using System;
 3 using System.Collections.Generic;
 4 using System.Linq;
 5 using System.Text;
 6 using System.Threading.Tasks;
 7 
 8 namespace Sj4.Entity
 9 {
10     /// <summary>
11     /// 加法
12     /// </summary>
13     public class Jiafa : Operation
14     {
15         //计算方法
16         public override double GetResult()
17         {
18             if (NumberB == 0)
19             {
20                 throw new Exception("不能为0");
21             }
22             double result = NumberA + NumberB;
23             return result;
24         }
25     }
26 }
View Code

相关文章:

  • 2022-12-23
  • 2021-11-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
  • 2021-05-14
  • 2021-10-07
  • 2021-08-21
相关资源
相似解决方案