How to declare a string with double quote substrings in VB.NET

2 Answers

0 votes
Imports System

Class Program
	Public Shared Sub Main()
        Dim str As String = "This is a string with ""double-quoted substrings1"", and ""double-quoted substrings2"" inside."
		
        Console.WriteLine(str)
    End Sub
End Class



' run:
'
' This is a string with "double-quoted substring1", and "double-quoted substring2" inside.
'

 



answered May 12, 2025 by avibootz
0 votes
Imports System

Class Program
	Public Shared Sub Main()
        Dim str As String = "This is a string with ""double-quoted substring1"", and ""double-quoted substring2"" inside."
		
        Console.WriteLine(str)
    End Sub
End Class



' run:
'
' This is a string with "double-quoted substring1", and "double-quoted substring2" inside.
'

 



answered May 12, 2025 by avibootz
...