除的类

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

 

posted @ 2017-04-10 23:58  南城。  阅读(113)  评论(0)    收藏  举报