unicorn.net

我的連結

Blog Stats

每月文章

隨筆分類

影像集

.net

blog

forum

friends

jQuery

open source

tools

web

想在 .Net 裏頭用 Set Collection (使用 Iesi.Collections.dll)

功能: 主要是取得2個Collection 裏,相同、相異、聯集的部份
必需加入的dll: Iesi.Collections.dl
範例:

補充:
1. 如果順序是重要的,那 HashedSet 可以改成 SortedSet
2. 如果用SortedSet, 集合內的物件必需繼承IComparable介面
3. 更詳盡的介紹可參考 Add Support for "Set" Collections to .NET
4.Iesi.Collection.dll 可在 NHibernate 專案裏找到, 裏面的版本加上對泛型的支援

posted on Thursday, February 14, 2008 8:10 PM

Feedback

No comments posted yet.
Title  
Name  
Url
驗證碼  
Comments