是否可以将 GroupCollection
转换为 List
或 IEnumerable
?
我指的是正则表达式中的 GroupCollection
。
最佳答案
当然
GroupCollection col = ...;
IEnumerable<Group> enumerable = col.Cast<Group>();
List<Group> list = col.Cast<Group>().ToList();
关于c# - 是否可以将 GroupCollection 转换为 List 或 IEnumerable?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2464668/