var List <struct>未知类型C#

时间:2015-08-24 21:27:11

标签: c# arrays list

我有这段代码:

  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#未知类型的成员

0 个答案:

没有答案