document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. using System;
  2. using System.Collections;
  3.  
  4. namespace MinValueProvider
  5. {
  6.     public class MinValueProvider
  7.     {
  8.         public int? GetMinValue(ArrayList array)
  9.         {
  10.             if (array == null) return null;
  11.  
  12.             int? minVal = null;
  13.  
  14.             foreach (var item in array)
  15.             {
  16.                 try
  17.                 {
  18.                     var temp = (int)item;
  19.                  
  20.                     if(minVal == null || minVal>temp)
  21.                     {
  22.                         minVal = temp;
  23.                     }
  24.                 }
  25.                 catch(Exception ex)
  26.                 {
  27.                     continue;
  28.                 }
  29.             }
  30.             return minVal;
  31.         }
  32.     }
  33. }
');