列表框中的行分隔/换行符 [英] Line separation / Line break in a listbox
本文介绍了列表框中的行分隔/换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在一个列表框上显示2组数据,例如,我不会在同一列表框上显示7次表和8次表.这是显示第一组数据的方式:
I want to display 2 sets of data on the one list box, for example, I would wont to display the 7 times table and the 8 times table on the same listbox. Here is how I get the first set of data displaying:
int awnser = 0;
int z;
z = int.Parse(textBox1.Text);
for (int i = 0; i < 11; i++)
{
awnser = z * i;
listBox6.Items.Add(z + " * " + i + " = " + awnser.ToString());
}
但是如何获得换行符或分隔符,以便可以将8倍表放在下面?
But how do I get a line break or separation so I can put the 8 times table just underneath?
推荐答案
如何?
编辑将其插入之后您的循环
listBox6.Items.Add(z + " * " + i + " = " + awnser.ToString());
}
listBox6.Items.Add("--------------------");
这篇关于列表框中的行分隔/换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文