Need help C#

Stealthminer

Newcomer
Joined
Aug 19, 2010
Messages
1
Hello all i need little help.

I Want to delete a line in txt file with C# Like ;

When i type "google" in textbox and press delete button my program deletes "google" line in txt.

is it possible ?

Thanks for your help.
 
I get the general idea of what you are trying to do, but it's not clear exactly what you mean. You ask about a text file but give an example with a textbox...

It sounds like some basic string/text manipulation is all you need. If you want to deal with lines, maybe consider using String.Split or File.ReadAllLines to get each line of text as a separate string within an array. Then, if you want to remove a line you can create a new string array with only the lines you want, and then replace the original text data with your new text data (likely involving String.Join or File.WriteAllLines).
 
Back
Top