Include quotes in variable value String

Asked

Viewed 3,641 times

2

I would like to know how to declare a variable of type String in which the value has quotes in Visual Basic . net?

For example:

Public frase As String = "E ele disse: -"Olá a todos!""

Is there any escape expression for Visual Basic understand that the quotes in the variable value are part of the value, and are not finishing the variable declaration?

2 answers

2


1

Yes, there is a way. You should use before " For example:

String Frase = " O cachorro é \"BRAVO\"  ";

Browser other questions tagged

You are not signed in. Login or sign up in order to post.