Foxtable(狐表)用户栏目专家坐堂 → [求助]能否在狐表里使用下面的第三方DLL进行运算


  共有23130人关注过本帖平板打印复制链接

主题:[求助]能否在狐表里使用下面的第三方DLL进行运算

帅哥哟,离线,有人找我吗?
ybtxdz
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:130 积分:874 威望:0 精华:0 注册:2008/8/31 21:32:00
[求助]能否在狐表里使用下面的第三方DLL进行运算  发帖心情 Post By:2009/4/8 11:09:00 [只看该作者]

在网上看到这么一个DLL

"有时候我们要进行集合的集合运算,如并集,交集等。由于.NET框架本身没有提供集合运算功能,在使用这方面的功能时,我们可以借助第三方的类库来实现。在NHibernate 框架中有个Iesi.Collection.dll,这个类库提供了集合运算功能,并且支持泛型。"

求助: 在狐表里能否使用该DLL? 如果能的话, 又该如何使用? 建议在狐表中增加此类运算.


例子:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Iesi.Collections.Generic;

public partial class _Default : System.Web.UI.Page 
{
    
protected void Page_Load(object sender, EventArgs e)
    {
        ISet
<string> Girls = new HashedSet<string>();   
         Girls.Add(
"Christine");   
         Girls.Add(
"Eva");   
         Girls.Add(
"Jean");   
         Girls.Add(
"Novia");   
        Girls.Add(
"Winnie");   
   
         ISet
<string> PMs = new HashedSet<string>();   
         PMs.Add(
"Eva");   
         PMs.Add(
"Novia");   
         PMs.Add(
"Vincent");   
         PMs.Add(
"Williams");   
         PMs.Add(
"Winnie");   
   
         ISet
<string> GirlPMs = Girls.Intersect(PMs);           
         Response.Write(
"是女生且是PM: <br />");   
         
foreach (string s in GirlPMs) {   
             Response.Write(s 
+ "<br />");   
         }   
   
         Response.Write(
"<br />");   
         ISet
<string> GirlNotPMs = Girls.Minus(PMs);   
         Response.Write(
"是女生且不是PM: <br />");   
         
foreach (string s in GirlNotPMs) {   
             Response.Write(s 
+ "<br />");   
         }   
   
         Response.Write(
"<br />");   
         ISet
<string> GirlOrPMs = Girls.Union(PMs);   
         Response.Write(
"是女生或是PM: <br />");   
         
foreach (string s in GirlOrPMs) {   
             Response.Write(s 
+ "<br />");   
         }   
   
         Response.Write(
"<br />");   
         ISet
<string> NotMatch = Girls.ExclusiveOr(PMs);   
         Response.Write(
"是女生但不是PM,或是PM但不是女生: <br />");   
         
foreach (string s in NotMatch) {   
             Response.Write(s 
+ "<br />");   
         }   

    }
}

运行结果: 

是女生且是PM: 
Eva
Novia
Winnie

是女生且不是PM: 
Christine
Jean

是女生或是PM: 
Christine
Eva
Jean
Novia
Winnie
Vincent
Williams

是女生但不是PM,或是PM但不是女生: 
Christine
Williams
Jean
Vincent
 下载信息  [文件大小:   下载次数: ]
点击浏览该文件:iesi.collections.rar


 回到顶部
总数 13 1 2 下一页