我可以做类似 "%s said %s blah.", $name, $blah;
的事情吗?在 VB.NET 中?
写作越来越痛苦name & "said" & blah & "blah"
.
最佳答案
在 VB.NET 14(对于 VS2015)中,您可以使用 string interpolation :
Dim newString As String = $"{name} said {blah} blah."
关于.net - 变量替换为字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2210574/