Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 26, 2012 11:16 AM by ramiramilu
Member
482 Points
441 Posts
May 26, 2012 10:14 AM|LINK
txtBox.Text = "RowNo:" + i.ToString() + " " + "ColumnNo:" + " " + j.ToString(); this line i get output 0 row 0 column, 0 row 1 column, 0 row 2 column, 1 row 0 column, 1 row 1 column, 1 row 2 column, but i want like this: 1,1 1,2 1,3 2,1 2,2 2,3 how to bring like this ?
61 Points
72 Posts
May 26, 2012 10:57 AM|LINK
for(int i=1; i<=2;i++)
for(int j=1; j<=3; j++)
txtBox.Text += "RowNo:" + i.ToString() + " " + "ColumnNo:" + " " + j.ToString()+ ",";
All-Star
97923 Points
14516 Posts
May 26, 2012 11:16 AM|LINK
majarajaking txtBox.Text = "RowNo:" + i.ToString() + " " + "ColumnNo:" + " " + j.ToString();
change that to -
txtBox.Text = "RowNo:" + (i+1).ToString() + " " + "ColumnNo:" + " " +(j+1).ToString();
majarajaking
Member
482 Points
441 Posts
Give me correct code
May 26, 2012 10:14 AM|LINK
txtBox.Text = "RowNo:" + i.ToString() + " " + "ColumnNo:" + " " + j.ToString();
this line i get output 0 row 0 column, 0 row 1 column, 0 row 2 column,
1 row 0 column, 1 row 1 column, 1 row 2 column,
but i want like this:
1,1 1,2 1,3
2,1 2,2 2,3 how to bring like this ?
praptic
Member
61 Points
72 Posts
Re: Give me correct code
May 26, 2012 10:57 AM|LINK
for(int i=1; i<=2;i++)
for(int j=1; j<=3; j++)
txtBox.Text += "RowNo:" + i.ToString() + " " + "ColumnNo:" + " " + j.ToString()+ ",";
ramiramilu
All-Star
97923 Points
14516 Posts
Re: Give me correct code
May 26, 2012 11:16 AM|LINK
change that to -
txtBox.Text = "RowNo:" + (i+1).ToString() + " " + "ColumnNo:" + " " +(j+1).ToString();
JumpStart