gpt4 book ai didi

c# - 如何增加 NumericUpDown 小数

转载 作者:太空宇宙 更新时间:2023-11-03 17:16:51 24 4
gpt4 key购买 nike

如何以这种方式增加 NumericUpDown 小数:

0.01, 0.02, 0.03, 0.01, 0.02, 0.03...

而不是

1.00, 2.00, 3.00, 4.00, 5.00...

最佳答案

您需要设置 Increment属性:

numericUpDown1.Increment = 0.01m;

您也可以在 Windows 窗体设计器中的 NumericUpDown 控件的属性窗口中进行设置。

关于c# - 如何增加 NumericUpDown 小数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42061536/

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