public static OrderInfoCollection GetInstance(string namesPath, string statesPath) { if (_instance == null) { _instance = new OrderInfoCollection(namesPath, statesPath); } return(_instance); }
public Form1() { InitializeComponent(); OrderInfoCollection orderInfoCollection = new OrderInfoCollection("nomes.txt", "estados.txt"); sfDataGrid2.DataSource = orderInfoCollection.Orders; ExcelCreator.CreateExcel("nomes.txt", "estados.txt"); }