主要要来做区间控制,比如查询订单,查询条件是创单时间 这区间就是开始-结束,
或者查询机票就是 出发- 到达
下面记录区间结构代码
1 ///2 /// 区间 3 /// 4 ///区间类型 5 [Serializable] 6 [DataContract] 7 public struct Range8 { 9 /// 10 /// The _lower.11 /// 12 private T lower;13 14 ///15 /// The _upper.16 /// 17 private T upper;18 19 ///20 /// Initializes a new instance of the 22 /// 23 /// The lower.24 /// 25 /// 26 /// The upper.27 /// 28 public Range(T lower, T upper)29 {30 this.lower = lower;31 this.upper = upper;32 }33 34 ///struct.21 /// 35 /// 下限(时间开始)36 /// 37 [DataMember]38 public T Lower39 {40 get { return this.lower; }41 set { this.lower = value; }42 }43 44 ///45 /// 上限(时间结束)46 /// 47 [DataMember]48 public T Upper49 {50 get { return this.upper; }51 set { this.upper = value; }52 }53 }