C# 如何循环并将项目添加到comboBox,使其从1开始到8? for(int xx=0;xx

C# 如何循环并将项目添加到comboBox,使其从1开始到8? for(int xx=0;xx,c#,.net,winforms,C#,.net,Winforms,piCount是int,它的值是8。 如果我从0开始,我将在组合框01234567中看到 但是我想看到12345678像这样改变计数器 for (int xx = 0; xx < piCount; xx++) { comboBox1.Items.Add(xx); } for(int xx=1;xx只需更改循环: for (int xx = 1; xx <= piCount; xx++) { comboBox1.Items.Add(xx); } for(int xx

piCount是int,它的值是8。 如果我从0开始,我将在组合框01234567中看到
但是我想看到12345678像这样改变计数器

for (int xx = 0; xx < piCount; xx++)
{
    comboBox1.Items.Add(xx);
}
for(int xx=1;xx只需更改循环:

for (int xx = 1; xx <= piCount; xx++)
{
    comboBox1.Items.Add(xx);
}
for(int xx=1;xx将循环更改为:

for (int xx = 0; xx < piCount; xx++)
{
    comboBox1.Items.Add(xx + 1);
}
for(int xx=1;xx
for (int xx = 0; xx < piCount; xx++)
{
    comboBox1.Items.Add(xx + 1);
}
for (int xx = 1; xx <= piCount; xx++)