摘要: 简单的实现一个利用list排序的方法:this.CallHistoryList.Sort(CompareTo);publicintCompareTo(CallHistoryleft,CallHistoryother){if(left.StartTime>other.StartTime){return-1;}elseif(left.StartTime==other.StartTime){return0;}else{return1;}} 阅读全文
posted @ 2012-01-12 18:00 higirle 阅读(219) 评论(0) 推荐(0) 编辑
摘要: publicstaticstringTryGetElementValue(thisXElementparentEl,stringelementName,stringdefaultValue=null){varfoundEl=parentEl.Element(elementName);if(foundEl!=null){returnfoundEl.Value;}else{returndefaultValue;publicstaticstringTryGetElementAttribute(thisXElementelement,stringattributeName,stringdefaultV 阅读全文
posted @ 2012-01-12 17:25 higirle 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 1. try to create new instance which need to parse to the call method in muliply threa method.,2. Singial instance: not to use the member in the signtan instance. otherwise, the thread sync problem will be a problem. which ist just for temp use.Try to create new one to pass to the method. Lock (thre. 阅读全文
posted @ 2012-01-12 17:25 higirle 阅读(316) 评论(0) 推荐(0) 编辑