storefoodprice.cs

来自「c#设计模式随书源码 c#设计模式随书源码」· CS 代码 · 共 31 行

CS
31
字号
using System;

namespace Facade
{
	/// <summary>
	/// Summary description for StoreFoodPrice.
	/// </summary>
	public class StoreFoodPrice {
		private int storeKey, foodKey;
		private float foodPrice;
		//-----
		public StoreFoodPrice(int sKey, int fKey, float fPrice) {
			storeKey = sKey;
			foodKey = fKey;
			foodPrice = fPrice;
		}
		//-----
		public int getStore() {
			return storeKey;
		}
		//-----
		public int getFood() {
			return foodKey;
		}
		//-----
		public float getPrice() {
			return foodPrice;
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?