在其他文件中加入
using MyClasses.Data;

解决方案 »

  1.   

    如果是web project,需要把编译后的dll放在\bin目录中,在引用文件中加
    using MyClasses.Data;
      

  2.   

    如果是web project,需要把编译后的dll放在\bin目录中,在引用文件中加
    using MyClasses.Data;
      

  3.   

    在其文件中直接使用该类(注意名字空间)编译时,比如在input.cs中使用该控件(MyClasses.dll)
    csc /reference:MyClasses.dll /out:out.exe input.cs
      

  4.   

    用 abstract 声明的类不能直接使用。
      

  5.   

    我是要用来创建其他类使用的。有没有办法在编译的时候不用加 /reference 参数
      

  6.   

    1、编译时使用reference参数引用你的dll程序集
    2、在 Visual Studio 开发环境中设置此编译器选项,“添加引用”
    3、以编程方式设置此编译器选项
    [C#] 
    Reference Add(string bstrPath);bstrPath 是COM 或 .NET Framework 引用的路径。 
    该参数可采用三种形式:
    (1)简单的 .NET Framework 对象名,例如“System”。 
    (2).NET Framework 文件名(.tlb、.dll 或 .ocx 文件)。-----你所说的情况 
    (3)COM 库文件(.tlb、.dll、.ocx 或 .exe 文件)。对于 COM 对象,路径需要包含完整路径和文件名,比如“D:\SomeApplication\SomeApp.dll”。请参见下面的“COM 引用”一节中对添加 COM .exe 文件引用的限制。示例
    ' Macro Editor
    Imports VSLangProj
    Sub AddExample()
       ' This example assumes that the first project in the solution is 
       ' either a Visual Basic or C# project.
       Dim aVSProject As VSProject = _
          CType(DTE.Solution.Projects.Item(1).Object, VSProject)
            
       Dim refs As References = aVSProject.References
       ' Adds a reference to a compiled .NET project.
       refs.Add("C:\path\program.dll")
       ' Adds a reference to an installed ActiveX control.
       refs.Add("C:\WINNT\system32\msmask32.ocx")
       ' Adds a reference to System.dll as an example of adding a
       ' reference using just the simple name.
       refs.Add("System")
    End Sub参见
    ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.2052/vbcon/html/vblrfaddmethodreferences.htm