各位大侠帮忙了,.net2005中以下代码居然报使用泛型类型System.Collections.Generic.Icomparer<T>需要一个类型参数估计在2003中可以使用,因为我看了很多地方都是这样写的,但在2005 中却不行啊?怎么改啊,大家帮帮忙.
class ListViewItemComparer : IComparer
{
private int col;public ListViewItemComparer(int column)
{
col = column;
}
public int Compare(object x, object y)
{
return String.Compare(((ListViewItem)x).SubItems[col].Text, ((ListViewItem)y).SubItems[col].Text);
}}
class ListViewItemComparer : IComparer
{
private int col;public ListViewItemComparer(int column)
{
col = column;
}
public int Compare(object x, object y)
{
return String.Compare(((ListViewItem)x).SubItems[col].Text, ((ListViewItem)y).SubItems[col].Text);
}}
解决方案 »
- 新手请教:关于绘制图片的效率
- 谁用过Timter,为啥我的timer停不了,代码如下
- 串口通讯中,发射端快,接受端慢的问题!
- C#一个双向列表! 我不会了!急等!
- 听说office是基于。net的,有没有人知道它的界面具体是用。net中哪一种技术实现的?
- 求助动态打开窗口实例的问题,在线等待!!!
- 程序运行时无响应状态
- 怎么获取Internet Explorer_Server的超级链接?
- PetaPoco运行后出错,谁能帮忙分析下
- c#里面判断MessageBox返回是ok的怎么判断让messagebox()=?
- 【救命呀】Debug,Release.
- 关于axwebbrowser newwindow2 e.ppDisp 怪问题
否则使用泛型接口