static void Main() { MyData md = new MyData(3, 4, 5); Console.WriteLine("Average: {0}", md.Average()); }
public static double Average(this MyData md) { return(md.Sum() / 3); }