I tried to delete lines more than 35 characters but I'm getting this error:
Cannot implicitly convert type 'System.Collections.Generic.IEnumerable' to 'string[]'. An explicit conversion exists (are you missing a cast?)
and I don't know how to fix it. Can anyone help me?
My code:
var lines = File.ReadAllLines("my path");
lines = lines.Where(x => x.Length <= 35); // error is here
File.Delete("my path");
File.AppendAllLines("my path", lines);