1)这两个文件就相当于你c++的两个头文件(.h)而已;
2)把文件IComputable`2.cs添加进引用就行,鼠标右击Reference文件夹,添加dll;最后再文件顶部解析一下,即假如你的IComputable`2在dll中的名称空间xxx下,或者鼠标右击IComputable<T1, T2>解析:using xxx;

解决方案 »

  1.   

    谢谢sudazf!
    dll已经加到引用路径了,文件顶部也加了using xxx声明,并且IComputable<T>和IComputable<TInput, TOutput>都在这个命名空间下面。为什么一个能用一个不能用呢?
    IComputable<T>和IComputable<TInput, TOutput>接口名一样,只是IComputable<TInput, TOutput>是对IComputable<T>进一步的泛化,在dll源码中是这样声明的:
    public interface IComputable<TInput, TOutput>: IComputable<TOutput>
      

  2.   

    1)我刚刚试了一下,新建了个类库工程,生成了dll文件:ClassLibrary1
    该dll项目下有两个class1.cs,class2.cs文件,对应你的那两个.cs文件;
    class1.cs中定义了你的第一个委托:    public interface IComputable<T>
        { 
        }class2.cs中定义了你的第二个委托:    public interface IComputable<TInput, TOutput> : IComputable<TOutput>
        {
     
        }2)我在测试项目下,引用了该dll,并且在文件头部引用了:using ClassLibrary1;然后使用它们:using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using ClassLibrary1;namespace ConsoleApplication1
    {
        class Program
        {
            static void Main(string[] args)
            {
                IComputable<object> ss;
                IComputable<object, object> dd;
            }
        }
    }没有任何引用不到的问题呀!你看看是不是你的dll文件里引用出了问题。
      

  3.   

    主要是持cs文件IComputable<TInput, TOutput>上面的namespace
    然后在你的程序中先using