📜  c# 从未知列表中获取计数 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:24.232000             🧑  作者: Mango

代码示例1
using System.Collections;

List list = new List(Enumerable.Range(0, 100));

ICollection collection = list as ICollection;
if(collection != null)
{
  Console.WriteLine(collection.Count);
}