예제 #1
0
 static void outInfo(string outPath, ArrayList arrInfo, double salary)
 {
     using (StreamWriter sw = new StreamWriter(outPath, false, System.Text.Encoding.Default))
     {
         sw.WriteLine("Работники, имеющие зарплату меньше {0} отсортированнные по стажу:", salary);
         foreach (object obj in arrInfo)
         {
             FIOData buf = (FIOData)obj;
             sw.WriteLine(buf.ToString());
         }
     }
 }
예제 #2
0
 public int CompareTo(object obj)
 {
     if (obj is FIOData)
     {
         FIOData buf = (FIOData)obj;
         if (experience > buf.experience)
         {
             return(1);
         }
         if (experience == buf.experience)
         {
             return(0);
         }
         else
         {
             return(-1);
         }
     }
     return(0);
 }