我有一個問題在同一個命名空間:在另一個Windows窗體的c#中使用類?
public partial class frmForm1 : Form // Form1
{
public class Account
{
public string Username, Password, RePassword, Name, bd, dt, dc;
}
public class ListAcc
{
public static int count = 0;
private static List<Account> UserList;
public static List<Account> Data()
{
return UserList;
}
}
public partial class frmForm2 : Form // Form2
{
private void button2_Click(object sender, EventArgs e)
{
ListAcc A; // error
string n = A<Account>[0].Usename; // error
// What should i do?
}
}
有人能幫助我解決這個問題?非常感謝!
,如果你告訴我們到底是什麼問題,這將有助於方式。 – BlackICE 2010-04-23 14:47:40