我有这段代码:
public partial class Form1 : Form
{
struct Address
{
public string sIPAddress;
public int nPort;
public int nErrors; // number of errors
public int nConnections; // num succesful connections
}
var listAddresses = new List<Address>();
public LoadList()
{
String str;
str=listAddresses.Count().ToString(); // C# Unknown type of member listAddresses
}
}
我在strListAddresses.Count行中收到此错误C#未知类型的成员