I'm sure this is something simple, but I am apparently having a "senior moment". Why in the following code is linq unavailable to the base class.
public class Strings: List<String> {
public Strings() { }
public Strings(IList<String> strings) : base(strings) { }
public Strings Skip2(int i) {
var x = new List<String>();
var y = x.Skip(1).ToList();
var z = this.Skip(1).ToList();
return new Strings(base.Skip(i).ToList());
}
}
This code produces a "Error CS0117 'List<string>' does not contain a definition for 'Skip'" error for "base.Skip(i)" (no error for x.Skip or this.Skip). Why are the linq extension methods unavailable using the base keyword. I'm running c# v6 in vs2015 if it matters.