重写方法:
public class MyList<T> : List<T> where T : IConvertible
{
public override string ToString()
{
return "";
}
}
调用:
MyList<string> list = new MyList<string>();
MessageBox.Show(list.ToString());
执行结果:"123"
2023-12-19 20:56:09
重写方法:
public class MyList<T> : List<T> where T : IConvertible
{
public override string ToString()
{
return "";
}
}
调用:
MyList<string> list = new MyList<string>();
MessageBox.Show(list.ToString());
执行结果:"123"