- var lines = File.ReadLines(readFolderFile, Encoding.Default)
- .Select((line, index) => new { Line = line.Trim(';'), LineNumber = index + 1 })
- .Where(x => !String.IsNullOrWhiteSpace(x.Line))
- .Select(x => $"{x.LineNumber};{x.Line};");
Hi Guys the code above I use to read files and then put them as strings into a IEnumerable.
I just have the problem that all first rows should be HeadLines but in my LineNumber column im getting 1 as the name is there a way to change that and write "RowNumber" instead?