i feel like C# has never been able to Generic as hard as i want, i wanna do shit like
public abstract class Something<T> where T : SomethingElse {
public abstract T GetSomethingElse();
}
public class ThingProducer {
// This is the thing I can't do.
private List<Something<?>> things;
public IEnumerable<SomethingElse> GetOtherThings() {
return things.Select(GetSomethingElse);
}
}
i can instead do this, but i don't like it because it doesn't provide the same type restriction on child classes of Something
public abstract class Something {
public abstract SomethingElse GetSomethingElse();
}
public class ThingProducer {
// This is now Legal.
private List<Something> things;
public IEnumerable<SomethingElse> GetOtherThings() {
return things.Select(GetSomethingElse);
}
}

