I need to export data from a class according to a specific layout that consists of size and position.
For easy maintenance, I need a simple layout change.
Below is my class:
public class NovosCotistasDTO
{
public string Agencia { get; set; }
public string Conta { get; set; }
public DateTime DataInclusao { get; set; }
public string Tipo { get; set; }
public string IdUsuario { get; set; }
public string CNPJ { get; set; }
}
Below is the layout that should be exported:
Campo |Tamanho |Posição Inicial |Posição Final
--------------------------------------------------------------
Agencia |5 |1 |5
Conta |13 |6 |19
DataInclusao |10 |20 |30
Tipo |1 |31 |32
IdUsuario |7 |33 |40
CNPJ |14 |41 |55