请问如何在textbox上同时显示多个数字(菜鸟级问题) 我做了一个随机函数,想把生成的数组上的数都显示在textbox,请问怎么做,在线等 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 将 TEXTBOX 的 MULTILINE 设为 TRUE 用一个循环啊。TextBox.text = ss[i].ToString + ","; using System;using System.Text;using System.Windows.Forms;class Test : Form{ Test() { StringBuilder sb = new StringBuilder(); Random rnd = new Random(); for (int i = 0; i < 10; i++) { sb.AppendFormat("{0}: {1}\r\n", i, rnd.Next()); } TextBox textBox = new TextBox(); textBox.Parent = this; textBox.Width = 200; textBox.Height = 200; textBox.Multiline = true; textBox.ScrollBars = ScrollBars.Vertical; textBox.Text = sb.ToString(); } static void Main() { Application.Run(new Test()); }} using System;using System.Text;using System.Windows.Forms;class Test : Form{ Test() { StringBuilder sb = new StringBuilder(); Random rnd = new Random(); for (int i = 0; i < 100; i++) { sb.AppendFormat("{0,3}: {1}{2}", i+1, rnd.NextDouble(), Environment.NewLine); } TextBox textBox = new TextBox(); textBox.Parent = this; textBox.Width = 200; textBox.Height = 200; textBox.ReadOnly = true; textBox.Multiline = true; textBox.ScrollBars = ScrollBars.Vertical; textBox.Text = sb.ToString(); textBox.SelectionLength = 0; } static void Main() { Application.Run(new Test()); }} for (int i=0; i<n; i++){ TextBox.text += s[i].ToString() + ",";} 将1到n^2共n^2个数等概率地填入n*n的方格中。 有返回值的函数中try catch使用问题? 怎麼將 Excel2007裡面的數據導入到sql 中 如何将查询到的表赋给参数 windows form DataGrid添加时出现无法显示 winform--怎样在DATAGRID中添加记录时,总将最新纪录显示在第一行 问个存储过程问题:怎样调用一个返回了记录、还有一个输出参数的存储过程,并使其结果记录和参数同时有值? C#子线程中如何添加消息处理? C#如何设置ini文件? 自定义的结构类型能否做为输出参数? 请教一个很简单的问题 这个事件为什么老不响应,
using System.Text;
using System.Windows.Forms;class Test : Form
{
Test()
{
StringBuilder sb = new StringBuilder();
Random rnd = new Random();
for (int i = 0; i < 10; i++)
{
sb.AppendFormat("{0}: {1}\r\n", i, rnd.Next());
} TextBox textBox = new TextBox();
textBox.Parent = this;
textBox.Width = 200;
textBox.Height = 200;
textBox.Multiline = true;
textBox.ScrollBars = ScrollBars.Vertical;
textBox.Text = sb.ToString();
} static void Main()
{
Application.Run(new Test());
}
}
using System.Text;
using System.Windows.Forms;class Test : Form
{
Test()
{
StringBuilder sb = new StringBuilder();
Random rnd = new Random();
for (int i = 0; i < 100; i++)
{
sb.AppendFormat("{0,3}: {1}{2}", i+1, rnd.NextDouble(), Environment.NewLine);
}
TextBox textBox = new TextBox();
textBox.Parent = this;
textBox.Width = 200;
textBox.Height = 200;
textBox.ReadOnly = true;
textBox.Multiline = true;
textBox.ScrollBars = ScrollBars.Vertical;
textBox.Text = sb.ToString();
textBox.SelectionLength = 0;
} static void Main()
{
Application.Run(new Test());
}
}
{
TextBox.text += s[i].ToString() + ",";
}