1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
| using System;
| using System.Collections.Generic;
| using System.Text;
|
| namespace Pub_Class
| {
| public class ClsListItem:IComparable
| {
| public int TabIndex;
| public string Text;
| public string Value;
|
| public ClsListItem(int i, string t, string v)
| {
| TabIndex = i;
| Text = t;
| Value = v;
| }
| #region IComparable 成员
|
| public int CompareTo(object obj)
| {
| if (obj is ClsListItem)
| {
| ClsListItem temp = obj as ClsListItem;
| return this.TabIndex.CompareTo(temp.TabIndex);
| }
| throw new NotImplementedException("obj is not a Student!");
| }
| #endregion
|
| }
| }
|
|