c# string replace comma with newline code example Example: c# string replace comma with newline string res = res.Replace(',', '\n');