Update&Delete Records in a C# DataGrid using .txt file
How to Update&Delete Records in a C# DataGrid and textfile .txt in c#.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
ali tuncerRank #1,498 · 1.1K reputationPosted Apr 5, 2016, 7:13 PM EDT
You can read text file to a list, remove item, and write back..
List myList = File.ReadAllLines("contact.txt").ToList(); //read
myList.RemoveAt(0); //removes first line
File.WriteAllLines("contact.txt", myList.ToArray()); //write back modified list
Rajeesh MenothRank #118 · 18.4K reputationPosted Apr 5, 2016, 9:47 AM EDT
S M Fasih ALi30 reputationPosted Apr 5, 2016, 12:42 PM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Apr 5, 2016, 8:22 PM EDT
S M Fasih ALi30 reputationPosted Apr 6, 2016, 10:38 AM EDT
Rajeesh MenothRank #118 · 18.4K reputationPosted Apr 6, 2016, 10:41 AM EDT
S M Fasih ALi30 reputationPosted Apr 12, 2016, 10:34 AM EDT