Code translators aren't 100% in converting from VB.NET to C#, you will need to manually change some code like you have found the
Microsoft.VisualBasic.Chr(10)
as one of them
these links show you how to do the same in C#
What is the C# equivalent of the chr() function?[
^]
C# equivilent for Asc and Chr[
^]
but here is a simple example conversion
Dim sMsg As String = msg.Replace("" & Microsoft.VisualBasic.Chr(10) & "", "\n")
To
Char newLine = (char)10;
string sMsg = msg.Replace(newLine, @"\n");