c# - 排序列表>,错误: InvalidOperati

我正在尝试对通用列表进行排序,并且出现了InvalidOperationException错误

有没有人建议如何纠正它?
List<XYZ<String, String>>列表作为参数通过函数传递。

func( List<XYZ<String, String>> PassedList) {

   PassedList.Sort();
}

任何建议都会很有帮助。

最佳答案

您的XYZ应该为IComparable

关于c# - 排序列表<xyz <String,String >>,错误: InvalidOperationException的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14881109/

相关文章:

apache-kafka - Kafka + Zookeeper : Connection to n

emulation - 游戏男孩 : What constitutes a "half-carry"

vb.net - 未定义类型 'CrystalDecisions.CrystalReports.En

class - 在 VBA 中设置类时编译错误

objective-c - 架构armv7和Phonegap的 undefined symbol

c# - 错误: An object reference is required for the n

r - R中仅Unix的软件包错误

scala - 卡在类型不匹配

asp.net-mvc - 访问asp.net mvc Controller ActionResul

inheritance - TypeScript 模块引用