当我想要使用Count属性时,我使用实现IEnumerable和ICollection接口的ILIST。ILIST数据结构是一个数组。我通过使用VS调试器进行了步骤,并发现下面的.Count属性返回Array.Length属性。IList<string> FileServerVideos = Directory.GetFiles(VIDEOSERVERPATH, "*.mp4"); if (FileServerVideos.Count == 0) return;