摘要: 阅读全文
posted @ 2018-06-22 11:04 2477 阅读(76) 评论(0) 推荐(0) 编辑
摘要:   第一步、创建一个类 //public class Tickete //{ //写一个Ticket类,有一个距离属性(本属性只读,在构造方法中赋值) //不能为负数,有一个价格属性,价格属性只读, //并且根据距离distance计算价格Price(1元/公里): //public Ticket( 阅读全文
posted @ 2016-03-14 18:50 2477 阅读(733) 评论(0) 推荐(0) 编辑
摘要: //创建一个委托public delegate decimal MathOperation(decimal left, decimal right); //创建方法参数和返回结果符合委托的定义public static decimal Add(decimal left, decimal right) 阅读全文
posted @ 2016-03-14 17:10 2477 阅读(110) 评论(0) 推荐(0) 编辑