除的类

Posted 南城。

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了除的类相关的知识,希望对你有一定的参考价值。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace jj4
{
   public class OperationDiv:Operation
    {
       public override double GetResult()
       {
            if(NumberB==0)
            {
                Console.WriteLine("不能为0");
            }
            double result = NumberA / NumberB;
               return result;
       }
    }
}

 

以上是关于除的类的主要内容,如果未能解决你的问题,请参考以下文章