相关疑难解决方法(0)

Powershell单引号vs双引号

我知道使用单引号而不是双引号之间的区别在于变量不会扩展.

$a = "hello"
"$a world"    # hello world
'$a world'    # $a world
Run Code Online (Sandbox Code Playgroud)

我习惯使用双引号,但我猜单引号可能更有效率.这总是如此吗?是否有关于此主题的文档?我用Google搜索了一下,但结果却因扩展变量的解释而不堪重负

powershell performance

3
推荐指数
2
解决办法
1554
查看次数

标签 统计

performance ×1

powershell ×1