//比较两个串 1本串大 -1 s串大 0相等 public int Compare(StringList s) { int sounceLength = this.Length(); int length = s.Length(); int i = 0; int j = 0; char c = '\0'; while (i < sounceLength && j < length) { s.GetCharByIndex(j + 1, ref c); if (this._data[i] > c) { return 1; } if (this._data[i] < c) { return -1; } i++; j++; } if (sounceLength == length) { return 0; } if (sounceLength > length) { return 1; } return -1; }