gpt4 book ai didi

.net - 变量替换为字符串

转载 作者:行者123 更新时间:2023-12-03 21:02:25 25 4
gpt4 key购买 nike

我可以做类似 "%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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com