You're passing different strings to the method.
- In a C# string literal, "\n" represents a new-line character (ASCII code 10).
- In a VB string literal, "\n" represents a back-slash (ASCII code 92) followed by a lower-case "n" (ASCII code 110).
Either change your C# code to use a verbatim string literal (
string message = @"...";
), or change your VB.NET string to use embedded new-line characters (
Dim message As String = "..." & Chr(10) & "..." & Chr(10) & "..."
).