首页 > 代码库 > 除的类

除的类

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;
       }
    }
}

 

除的类