program.cs
来自「大话设计模式源码bigtalkdesignpattern_src」· CS 代码 · 共 23 行
CS
23 行
using System;
using System.Collections.Generic;
using System.Text;
namespace 工厂方法_计算器
{
class Program
{
static void Main(string[] args)
{
IFactory operFactory = new AddFactory();
Operation oper = operFactory.CreateOperation();
oper.NumberA = 1;
oper.NumberB = 2;
double result=oper.GetResult();
Console.WriteLine(result);
Console.Read();
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?