问题描述
伙计们,
我使用VS.NET 2008在VB.NET中编写了一个小程序,对数字进行排序.
我从TextBox1.text中输入用逗号分隔的数字,播放某种算法,然后单击按钮,在TextBox2.text中显示排序后的值.
现在我想将数字限制为仅20个位置(例如32,1,6,32,12,21,21,54,675,8,4,3,2,9,0,21,21,21,43,744 )在TextBox1.text中,所以我想到了数逗号:laugh:
我可以这样做吗?还是有更好的方法来实现这一目标?
谢谢
Hi guyz,
I wrote a tiny programme in VB.NET using VS.NET 2008 to sort numbers.
I take the input of numbers separated by commas from TextBox1.text, play some algorithm then by clicking a button, display the sorted values in TextBox2.text.
NOW i want to restrict the numbers to be only 20 positions (eg. 32,1,6,32,12,21,21,54,675,8,4,3,2,9,0,21,21,21,43,744) in the TextBox1.text and so i thought of counting the commas :laugh:
Can I do that, how? OR is there any better way to achieve this?
Thanks
推荐答案
这篇关于如何计算逗号“,"的数量?在TextBox.text中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!