How to combine a string with a dynamic double-quoted substring in VB.NET

1 Answer

0 votes
Imports System

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



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

 



answered May 12 by avibootz
...