use class in another windows form c# ???
Posted
by Chelsea_cole
on Stack Overflow
See other posts from Stack Overflow
or by Chelsea_cole
Published on 2010-04-23T14:46:58Z
Indexed on
2010/04/23
14:53 UTC
Read the original article
Hit count: 159
c#
I have a problem in a same namespace:
public partial class frmForm1 : Form // Form1
{
public class Account
{
public string Username;
public string Password;
public string RePassword;
public string Name;
public string bd;
public string dt;
public string 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?
}
}
Someone can help me fix this problem? Thanks alot!
© Stack Overflow or respective owner