operationdiv.cs
来自「C#计算器 用来计算简单的小计算!」· CS 代码 · 共 21 行
CS
21 行
using System;
using System.Collections.Generic;
using System.Text;
namespace Calculator
{
/// <summary>
/// 除法类
/// </summary>
public class OperationDiv : Operation
{
public override double GetResult()
{
double result = 0;
if (StrNumB == 0)
throw new Exception("除数不能为0;");
result = StrNumA / StrNumB;
return result;
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?