I\'m trying to fetch multiple email addresses seperated by \",\" within string from database table, but it\'s also returning me whitespaces, and I want to remove the whitesp
string input =Yourinputstring; string[] strings = input.Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries); foreach (string value in strings) { string newv= value.Trim(); if (newv.Length > 0) newline += value + "\r\n"; }