public string this[int idx] { get { if (idx >= Names.Length || idx < 0) { throw new IndexOutOfRangeException(); } switch (idx) { case 0: return(OA.ToString() + ", " + OB.ToString() + ", " + OC.ToString()); case 1: return(Sum_of_edge_lengths().ToString()); case 2: return(Volume().ToString()); case 3: return(SurfaceArea().ToString()); default: return(null); } } }
public override string ToString() { return(OA.ToString() + '|' + OB.ToString() + '|' + OC.ToString()); }