使用正则来处理字符串数据,然后再类型转换: double d = 123.4986;double tmp = double.Parse(Regex.Match(d.ToString(), @"[\d]+.[\d]{0,2}").Value);