3
I would like to take the elements of my products class and record a txt file as would my Serialization method.
class Program
{
static void Main(string[] args)
{
var products = new List<Product>
{
new Product(1, "KEYLG1", "Keyboard Logitech", 78.9),
new Product(2, "MOULG1", "Mouse M280 Logitech", 55.5),
new Product(3, "SMGM01", "Samgsung DUOS", 234.9),
new Product(4, "NTASUS", "Notebooke Asus", 3500.99)
};
var fileName = @"c:\temp\Products.txt";
Serialize(fileName, products);
}
/// <summary>
/// Serializa os dados aqui.
/// </summary>
/// <param name="fileName"></param>
/// <param name="products"></param>
private static void Serialize(string fileName, List<Product> products)
{
throw new NotImplementedException();
}
}
you want to record each information separated by
;
example1;KEYLG1;Keyboard Logitech; 78.9
or some other format? I was in doubt about it.?– novic