I have a list of object of a class, I am going through it but I need to convert the object to a string with some delimiter (for example by comma)
List<RipsAC> listaRipsAc = new List<RipsAC>();
I am looping through this list with a foreach
foreach (var error in numFactur)
{
erroresAc.Add("El campo Numero Factura no es valido: ("+error.NumFactura +") <---> linea: "+ /* string concatenado del objeto */ + " <---> Ruta Archivo: "+error.RutaArchivo);
}
I need to display the object bounding properties.
Using Reflection you can get the properties of the object and concatenate them with ","
Import System.Reflection:
Your method:
...
You can override the method
ToString();
, here is some information about it.Result