I am printing the contents of a list of objects that I retrieve from a DB, but when I read the result of the list, it only prints a single object and not all of the ones I store, I do not know what I am doing wrong, What I try to do is send an email with the records of a query, everything is fine just this is how to print all the objects in the list in the body of the email
Dim tabla As New funciones()
Dim valor = tabla.Consultar()
For Each item As lstRecogerEquipos In valor
If Not valor Is Nothing Then
x = item.factura
y = item.fecha
End If
Next
cuerpoCorreo = "<html><body><div style='text-align:center'>" & _
"<h3>Nueva Compra </h3><hr/><br/>" & _
"<italic>Hola</italic><br/>" & _
"<br/><table style='border-color: #666;margin: 0 auto;' cellpadding='10' >" & _
"<tr style='background: #eee;'><td><strong>Factura:</strong> </td><td>" & x & "</td></tr>" & _
"<tr><td><strong>Fecha:</strong> </td><td>" & y & "</td></tr>" & _
"</table>" & _
"<div></body></html>"