gpt4 book ai didi

c# - 方法 'tostring' 没有重载需要 1 个参数

转载 作者:行者123 更新时间:2023-11-30 14:50:54 28 4
gpt4 key购买 nike

我正在尝试让我的轨迹栏更新并将结果打印到带有 2 个小数点的文本框中。

我这里的代码

widthTxt.Text = widthBar.ToString("#,0.00");

不断返回

"No overload for method 'ToString' takes 1 arguments"

谁能帮我弄清楚如何解决这个问题?提前致谢。

最佳答案

可能你错过了Value属性(property)。 widthBar.Value.ToString("#,0.00")

关于c# - 方法 'tostring' 没有重载需要 1 个参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35685208/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com