vb.net: Replace function with double quotes in From part [duplicate] - vb.net

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
replace " in vb.net
in vb.net how can i use replace function when the replace from part has double quotes in its value ?

Dim s As String = String.Replace("some string", "some "" string with quotes")

Related

Is possible make operations from a var? (VB .net or other programming languages) [duplicate]

This question already has answers here:
Is there a string math evaluator in .NET?
(18 answers)
Evaluate mathematical expression from a string using VB
(3 answers)
Closed last year.
For example:
Dim operationVar As String = "+"
result = value1 (operationVar) value2
It's only an idea, I don't even know if it's possible.

How do I input a double quote in a vb.net string [duplicate]

This question already has answers here:
How to add open and close quotes if A string has spaces
(3 answers)
Closed 6 years ago.
How would I insert a double quote (") in vb.net without signalling the end of the string?
Use Chr(34) instead of the actual character. Check out decimal codes for more like this one.

Can I put parentheses inside a string? [duplicate]

This question already has an answer here:
How to put data containing double-quotes in string variable? [duplicate]
(1 answer)
Closed 7 years ago.
I'm writing a script generator in Visual Studio and I've run across a problem.
This is my code:
Dim Text As String
Text = "Register.node("Play") {(speed = 0, Evnt=0,)}"
And the string doesn't cover it.. I don't know why it keeps exiting the string?
In all other languages I've used there is no way of exiting a string from inside.
I would suggest either using double quotes...
Text = "Register.node(""Play"") {(speed = 0, Evnt=0,)}"
Or typing it thusly.
Text = 'Register.node("Play") {(speed = 0, Evnt=0,)}'
or maybe even like so.
Text = "Register.node("+"Play"+") {(speed = 0, Evnt=0,)}"

Excel VBA single quote in a string [duplicate]

This question already has answers here:
Escaping quotes in a string in VB6
(7 answers)
Closed 8 years ago.
I am trying to make one of my variables equal to the following:
Dim Quote as string
Quote = "Letter Size 11 x 17""
I need the single quote/inch symbol in the text but i do not know how to make VBA recognize it without giving me and error saying i have to end quote it.
Try one of these. It seems to do what you want (depending on where you want the ":
Sub test()
Dim Quote As String
Quote = "Letter Size 11 x 17"""
Debug.Print Quote
Quote = "Letter Size 11"" x 17"""
Debug.Print Quote
End Sub

How to put data containing double-quotes in string variable? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
replace " in vb.net
How to put data containing double-quotes in string variable?
Aug 01, 2003 02:30 AM | LINK
I need to store a string that contains words in double quotes. The complete string data is presented to the variable in double quotes, but the next double quotes within the data ends the string and the remaining text gives a syntax error. How can I place literal double-quotes in a string variable? For example:
Dim MyVar as string = "stm_bm(["menu53d0",400,"","blank2.gif",0,"","",0,0,250,0,1000,1,0,0,""],this);"
You can escape (this is how this principle is called) the double quotes by prefixing them with another double quote. You can put them in a string as follows:
Dim MyVar as string = "some text ""hello"" hello"
This will give the MyVar variable a value of some text "hello" hello.