I have investigated further. The problem is that
Environment.NewLine
returns the string
"\r\n"
, so you cannot parse that to a single character. Try this:
string[] lines = clipboardvalue.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);