public Segment Get(int idx) { if (idx < 0 || idx >= list.Count) return null; return (Segment)list[idx]; }