Hi All
Can anyone help me in understanding the highlighted text please.
For Each row As DataRow In ds.Tables(0).Rows
Dim arr() As Object = row.ItemArray()
For i As Integer = 0 To arr.Length - 1
If arr(i).ToString().IndexOf(",") > 0 Then ' I m unable to get this line of code.
record = record & Chr(34) & arr(i).ToString() & Chr(34) & ","
Else
record = record & arr(i).ToString() & ","
End If
Next
body = body & record.Substring(0, record.Length - 1) & vbCrLf
record = ""
Next
Thanks
Asif Ali.
take the object in Array arr at position indicated by i
convert to a string
find the index (position) of a comma character
see if the comma occurred after the first character position
Hi there
Fantastic explanation..
Thanks Again
Asif.
0 comments:
Post a Comment