How to extract line between 2 lines in c# -
i have text file content as:
************** text **************
i want read text between **** in c#. how can achieve same in c sharp
you use readalltext
contents of file, replace
, trim
remove unwanted contents of file:
var result = system.io.file.readalltext(@"c:\path\to\file.txt") .replace("*", string.empty) // remove asterisks .trim(); // trim whitespace , newlines
Comments
Post a Comment