这是什么错误?CS0260: Missing partial modifier on declaration of type 'Conn'; another partial declaration of this type exists
cs文件代码如下:
using System;
using System.Data;
using System.Data.SqlClient;
public class Conn
{
public string ConnStr="Data Source=localhost;Initial Catalog=KONews;Persist Security Info=True;User ID=sa;Password=";
SqlConnection conn;
static Conn()
{
}
public Conn()
{
}
public void ConnOpen()
{
conn = new SqlConnection(ConnStr);
conn.Open();
}
public void ConnClose()
{
conn.Close;
conn.Dispose;
}
}
aspx文件调用时写的是
Conn conn = new Conn();
conn.ConnOpen();
结果出现错误:CS0260: Missing partial modifier on declaration of type 'Conn'; another partial declaration of this type exists
显示是Line 5: public class Conn这一行的错误
这是怎么回事?
谢谢