StringBuilder 对于操作字符串来说真的有它的一些优点,有时候还是很方便的。namespace在System.Text下。举个小例子大家一看就明白。 StringBuilder sb = new StringBuilder("aa"); //sb = "aa" string strTest = sb.ToString(); sb.Append("dd"); strTest = sb.ToString(); //strTest = "aadd" sb.Append(10); strTest = sb.ToString(); //strTest = "aadd10" } 说到Hashtable 也真是满好用的,至少可以形成键,值 的双存储,而不用你另外做工作了,而且都是object类型,随便你存储了。namespace : System.Collections Hashtable ht = new Hashtable();//哈希表用来存放ID/Bool键值对 for (int i = 0; i < 10; i++) } IDictionaryEnumerator ide; ide= al.GetEnumerator(); while(ide.MoveNext()) } 相关文章: