In C# what\'s the best way to remove blank lines i.e., lines that contain only whitespace from a string? I\'m happy to use a Regex if that\'s the best solution.
EDIT
char[] delimiters = new char[] { '\r', '\n' }; string[] lines = value.Split(delimiters, StringSplitOptions.RemoveEmptyEntries); string result = string.Join(Environment.NewLine, lines)