/// <summary> /// Return a type for the specified string /// </summary> /// <param name="value"></param> /// <param name="units"></param> /// <returns></returns> public static Type DetermineType(string value, string units) { Type ColumnType; if (value == "?") { ColumnType = Type.GetType("System.String"); } else if (MathUtilities.IsNumericalenUS(value)) { ColumnType = Type.GetType("System.Single"); } else if (units == "" && StringUtilities.IsDateTime(value)) { ColumnType = Type.GetType("System.DateTime"); } else if ((units.Contains("d") && units.Contains("/") && units.Contains("y")) || StringUtilities.IsDateTime(value)) { ColumnType = Type.GetType("System.DateTime"); } else { ColumnType = Type.GetType("System.String"); } return(ColumnType); }