using System; using System.Collections.Generic; using System.Text; namespace Largest ...{ publicclass Cmp ...{ publicstaticint Largest(int[] list) ...{ int index, max = Int32.MinValue; if (list.Length ==0) ...{ thrownew ArgumentException("largest:Empty list"); } for (index =0; index <= list.Length -1; index++) ...{ if (list[index] > max) ...{ max = list[index]; } } return max; } } }
先建立一个类库,名称为Largest,用于寻找最大数 using System;using System.Collections.Generic;using System.Text;namespace Largest...{ public class Cmp ...{ public static int Largest(int[] list) .