Line break encoding for Twilio SMS using C #?

I am using WebApi 2.2 to extend the Twilio API. I have Twilio C # libraries installed.

I use a form to write a string in my web application and I submit it to webAPI. I am wondering how I can use C # libraries to send a message with line breaks.

The sample code shows the following:

        var msg = twilio.SendMessage("+15084043345", "+15084043345", "Can you believe it this easy to send an SMS?!");

However, I'm not sure how to include line breaks in this post. Should I insert anything into this clientide line to represent the line? Any guidance would be awesome.

+4
source share
2 answers

The Twilight Evangelist is here.

This is actually super simple:

var msg = twilio.SendMessage("+15084043345", "+15084043345", "Hello.\nCan you believe it this easy to send an SMS?!");

will result in:

Hello. Can you believe it this easy to send an SMS?!

, , \n, \r\n \r . , , \n . ( , iOS 8 ...)

+4

,

: suraj

: 24

asp.net VB

Dim value As String = " :" "suraj" vbCrLf ":" "24"

SMS -

0

All Articles