重写方法:
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"
重写方法:
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"