Example:
public class MyList<T> : List<T> {
public MyList(List<T> list) {
this = list; // this is basically what I want, but doesn't work
base = list; // this also doesn't work
}
}
Any solutions? Or is what I'm trying to achieve simply a bad idea?
Motivation: I want to add a custom function to a List object.
Can you not do:
public MyList(List<T> list) : base(list)
Alternatively, couldn't you use an extension method on the List object?