0

Hi everyone,

I am new to c# and have come across to this:


dataGridView[int a, int b].Value.ToString();

I understand that it takes the values of rows and turns them to string, but I cannot figure out the two integers. Are they the first and last rows respectively? What am I missing out?

Thanks very much.

2
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by nkarvi
0

You are in fact indexing the DataGridView by using that syntax.
In your case it says: Show the string of the Value in column a and row b. (column and row indexes are zero based, so column 0 would be the first column)

0

Thank you very much!

You have been very very helpful!

Thanks again:)

0

Glad to be of help.
I will give you one more tip: don't use the names a and b use something like c or ror better still coland row. Your code will become clearer and easier to follow.
Happy programming :)

0

Thanks for the advice. Logical and practical.

Thanks again :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.