- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
var lines = content.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries).ToList();
// remove first and last tags
lines = lines.Skip(2).Take(lines.Count - 3).ToList(); // <------------ ОНО
for (var i = 0; i < lines.Count; i++)
{
// remove one indent from each line
lines[i] = lines[i].Substring(indentation, lines[i].Length - indentation);
}