DataItem.cs
资源名称:apriorics.rar [点击查看]
上传用户:zijide88
上传日期:2022-07-10
资源大小:77k
文件大小:1k
源码类别:
数据库系统
开发平台:
Visual C++
- using System;
- using System.Collections.Generic;
- using System.Text;
- public class DataItem:IComparable
- {
- public DataItem()
- {
- }
- public DataItem(int id)
- {
- this.Id = id;
- }
- public DataItem(int id, string itemName)
- {
- this.Id = id;
- this.ItemName = itemName;
- }
- private string itemName;
- public string ItemName
- {
- get { return itemName; }
- set { itemName = value; }
- }
- private int id;
- public int Id
- {
- get { return id; }
- set { id = value; }
- }
- public override bool Equals(object obj)
- {
- DataItem di = (DataItem)obj;
- return di.Id.Equals(this.Id);
- }
- #region IComparable Members
- public int CompareTo(object obj)
- {
- DataItem di = (DataItem)obj;
- return this.Id.CompareTo(di.Id);
- }
- #endregion
- }