public static int ConvertToInt(string value) { var l = Convert.ToInt64(value); if (l > Int16.MaxValue) { l = l / 1024; } return Convert.ToInt32(l); }