I would like to get the elements of my products class and save a txt file as my Serialization method would.
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();
}
}