Explain this expression insife if condition

row.Item(0).ToString.Trim.ToUpper.Equals(reportViewerColumn(0).Trim.ToUpper) and row.Item(1).ToString.Trim.ToUpper.Equals(reportViewerColumn(1).Trim.ToUpper) and row.Item(2).ToString.Trim.ToUpper.Equals(reportViewerColumn(2).Trim.ToUpper) and row.Item(3).ToString.Trim.ToUpper.Equals(reportViewerColumn(3).Trim.ToUpper) and row.Item(4).ToString.Trim.ToUpper.Equals(reportViewerColumn(4).Trim.ToUpper)

It’s a simple Compare condition…!!!


Will remove the space from row.item(0) and convert it to upper case


Now the Equals condition does an exact compare for both strings

all the AND is present so that all the conditions needs to be true to get result in Boolean be as TRUE
else FALSE

I saw multiple questions from you, can you please mark questions solved for you and start closing old post!!!

For most of the questions that you are asking a quick google search will bring up the information you need. Google "vb net " + your search term and you should find dozens of examples.

For this question, for example
“vb net trim”
“vb net toupper”
“vb net to string equals”
“vb net row.Item”

All of these searches bring up relevant information.