请教一个.net的简单问题

qdsclove 2010-10-31 10:11:22
在TextBox中输入一组以空格间隔的一组数字,怎么能把数字提取出来,赋值到一个数组里面去?
...全文
151 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
Herbert 2010-11-01
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 wuyq11 的回复:]
string[] arr=textbox1.Text.Split(' ');
[/Quote]
up
chen_ya_ping 2010-11-01
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 wuyq11 的回复:]

string[] arr=textbox1.Text.Split(' ');
[/Quote]
就这个了。
lybjust 2010-11-01
  • 打赏
  • 举报
回复
string[] myArr=textbox1.Text.Split(' ');
nitaiyoucala 2010-11-01
  • 打赏
  • 举报
回复
Split()
youngmac 2010-11-01
  • 打赏
  • 举报
回复
string[] arr=textbox1.Text.Split(' ');
generhappy 2010-11-01
  • 打赏
  • 举报
回复
以一个数组的形式将数据取出


string[] arr=textbox1.Text.Split(' ');
kokorenfeng 2010-11-01
  • 打赏
  • 举报
回复
textbox1.Text.Split(' ');
chenlanglin 2010-11-01
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 wuyq11 的回复:]
string[] arr=textbox1.Text.Split(' ');
[/Quote]

qdsclove 2010-11-01
  • 打赏
  • 举报
回复
结贴了啊。
[Quote=引用 14 楼 var_han 的回复:]

怎么还不结贴?
[/Quote]
var_han 2010-11-01
  • 打赏
  • 举报
回复
怎么还不结贴?
rr998 2010-11-01
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 wuyq11 的回复:]
string[] arr=textbox1.Text.Split(' ');
[/Quote]
+1
高三石 2010-11-01
  • 打赏
  • 举报
回复
[Quote=引用 11 楼 herbt 的回复:]
引用 1 楼 wuyq11 的回复:
string[] arr=textbox1.Text.Split(' ');

up
[/Quote]
up again
axie534 2010-10-31
  • 打赏
  • 举报
回复
string[] arr=textbox1.Text.Split(' ');
消失的尘芥 2010-10-31
  • 打赏
  • 举报
回复
取值的时候直接把空格去掉,this.textbox.text.trm();
wuyq11 2010-10-31
  • 打赏
  • 举报
回复
string[] arr=textbox1.Text.Split(' ');

62,271

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧