09 2011 档案

摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace SequenceList{ public interface IListDS<T> { int GetLength(); void Clear(); bool IsEmpty(); void Append(T item); void Insert(T item, int i); T Delete(int i); ... 阅读全文
posted @ 2011-09-30 11:51 Ligeance 阅读(291) 评论(0) 推荐(0) 编辑
摘要:View Code static void FindTwoMins(int[] intArr, ref int firstMin, ref int secondMin) { if (intArr == null || intArr.Length <2) { throw new Exception("Input array can't be empty or less than 2"); } if (intArr[0]> intArr[1]) ... 阅读全文
posted @ 2011-09-21 15:58 Ligeance 阅读(748) 评论(0) 推荐(0) 编辑
摘要:static string ReplaceChar(string str, char chr1, char chr2) { if (str == null || str == string.Empty) { throw new Exception("String input can not be null"); } string result = ""; for (int i = 0; i < str.Length; i++)... 阅读全文
posted @ 2011-09-21 15:34 Ligeance 阅读(11227) 评论(0) 推荐(0) 编辑
摘要:static string ReverseString(string str) { if (str == null || str.Length <= 1) { return str; } string result = ""; for (int i = str.Length - 1; i >= 0; i--) { result += str[i]; } ... 阅读全文
posted @ 2011-09-21 15:25 Ligeance 阅读(350) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示