ways to escape { in string.format function in vb

后端 未结 3 1510
隐瞒了意图╮
隐瞒了意图╮ 2021-01-13 07:06

I am facing an issue with my code .

the thing is i want to escape { in the string.format function ...

Of course one way to escape it is to use {{ (2 curly br

3条回答
  •  遥遥无期
    2021-01-13 08:05

    Well, you could do it this way, but not a good idea in my view.

        Dim str1 As String = "Print this " & Chr(123) & "0" & Chr(125) & " string"
        Dim str2 As String = "silly"
        Console.WriteLine(String.Format(str1, str2))
        Console.ReadLine()
    

提交回复
热议问题