public void GetOrderNO(string no);
======
 public void GetOrderNO(string no){};定义了方法  只是没有具体实现而已

解决方案 »

  1.   

    这应该是抽象类和抽象方法吧,应该加abstract
      

  2.   

    5楼:
        你可以参看下微软提供的API。
        System.Data.SqlClient.SqlConnection 
       文件下都是定义,没有具体的实现,而我们能直接new SqlConnection 
       然后就直接使用它的方法。
         // 摘要:
        //     Represents an open connection to a SQL Server database. This class cannot
        //     be inherited.
        [DefaultEvent("InfoMessage")]
        public sealed class SqlConnection : DbConnection, ICloneable
        {
            // 摘要:
            //     Initializes a new instance of the System.Data.SqlClient.SqlConnection class.
            public SqlConnection();
            //
            // 摘要:
            //     Initializes a new instance of the System.Data.SqlClient.SqlConnection class
            //     when given a string that contains the connection string.
            //
            // 参数:
            //   connectionString:
            //     The connection used to open the SQL Server database.
            public SqlConnection(string connectionString);        // 摘要:
            //     Gets or sets the string used to open a SQL Server database.
            //
            // 返回结果:
            //     The connection string that includes the source database name, and other parameters
            //     needed to establish the initial connection. The default value is an empty
            //     string.
            //
            // 异常:
            //   System.ArgumentException:
            //     An invalid connection string argument has been supplied, or a required connection
            //     string argument has not been supplied.
            [DefaultValue("")]
            [ResDescription("SqlConnection_ConnectionString")]
            [RecommendedAsConfigurable(true)]
            [RefreshProperties(RefreshProperties.All)]
            [ResCategory("DataCategory_Data")]
            [Editor("Microsoft.VSDesigner.Data.SQL.Design.SqlConnectionStringEditor, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
            public override string ConnectionString { get; set; }
            //
            // 摘要:
            //     Gets the time to wait while trying to establish a connection before terminating
            //     the attempt and generating an error.
            //
            // 返回结果:
            //     The time (in seconds) to wait for a connection to open. The default value
            //     is 15 seconds.
            //
            // 异常:
            //   System.ArgumentException:
            //     The value set is less than 0.
            [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
            [ResDescription("SqlConnection_ConnectionTimeout")]
            public override int ConnectionTimeout { get; }
            //
            // 摘要:
            //     Gets the name of the current database or the database to be used after a
            //     connection is opened.
            //
            // 返回结果:
            //     The name of the current database or the name of the database to be used after
            //     a connection is opened. The default value is an empty string.
            [ResDescription("SqlConnection_Database")]
            [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
            public override string Database { get; }
            //
            // 摘要:
            //     Gets the name of the instance of SQL Server to which to connect.
            //
            // 返回结果:
            //     The name of the instance of SQL Server to which to connect. The default value
            //     is an empty string.
            [Browsable(true)]
            [ResDescription("SqlConnection_DataSource")]
            [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
            public override string DataSource { get; }
      

  3.   

    5楼:   加入我想看public SqlConnection(string connectionString);
       里的具体的操作那我怎么能看到?
       
      

  4.   

    上面的SqlConnection和楼主给的代码不是一个类,那个叫做类的元数据。当引用了C#写的DLL后,你就可以在VS中看到它的类型元数据。仅仅是给你看看定义和注释的。
      

  5.   


    public class OrderS
      {
      public OrderS();//这里自己把自己写进来了  public void GetOrderNO(string no);
      public bool HasOrder(string usercode, string enterName);
      public int GetTaskCount(string UserId);
      }}
    虽然没有实例化,但是在你写的类里面已经把自己包括进去了,
    自己=new 自己,有什么不可以?真搞不懂你,看代码都不看仔细!
      

  6.   


    这个东西不是写出来的,你可以建一个类库工程,然后写好类,在编译之,然后将类库的编译输出文件
    xxx.dll(注意是文件,而不是类库工程本身),在另外的工程中引用。然后那个工程中点击你在第一个工程中给出的类名,就可以看到你需要的东西了
      

  7.   

    具体实现,Dll文件是IL表现,你需要反编译,这些都有工具的。
      

  8.   


    你把定义好的元数据怎么和将要打包的dll合并到dll中?