static public MeasurementUnit GetMeasurementUnit(string[,] words)
 {
     try
     {
         var        unitList   = MeasurementUnitDictionary.MeasurementUnitNames();
         LengthUnit lengthUnit = LengthUnit.MICRON;
         var        inputUnit  = new MeasurementUnit(lengthUnit);
         foreach (string unitStr in unitList)
         {
             for (int i = 0; i < words.GetLength(0); i++)
             {
                 for (int j = 0; j < words.GetLength(1); j++)
                 {
                     string upperw = words[i, j].ToUpper();
                     if (upperw.Contains(unitStr))
                     {
                         Enum.TryParse(unitStr, out lengthUnit);
                         inputUnit = new MeasurementUnit(lengthUnit);
                         break;
                     }
                 }
             }
         }
         return(inputUnit);
     }
     catch (Exception)
     {
         throw;
     }
 }
 public MeasurementUnit(LengthUnit lengthUnit)
 {
     ConversionFactor = MeasurementUnitDictionary.ConversionToMM(lengthUnit);
     Name             = lengthUnit.ToString();
     LengthUnits      = lengthUnit;
 }