> 数学 >
C#中 一个 double类型的值 我需要 取小数点前面的整数 也需要取小数点后面的小数 都需要取
人气:384 ℃ 时间:2020-04-20 14:44:54
解答
double number = 123.456
string[] strSplit = number.split('.');
strsplit[0]为整数部分
strsplit[1]为小数部分
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版