Hey guys is it posssible to read from file and add to collectionBase?For my litle project i need to use collection and read file but the app needs to save.
it saves to file but i find it faster and easyer to read from collection and search,edit,delete...
string[] lineOfContents = File.ReadAllLines("Myfile.txt");
foreach (var line in lineOfContents)
{
string[] tokens = line.Split(',');
comboBox1.Items.Add(tokens[0]);
string lines = "THIS IS WERE I BLOCK";
System.IO.StreamWriter file = new System.IO.StreamWriter("Conservateur.txt");
file.WriteLine(lines);
richTextBox1.AppendText(lines);
file.Close();
}