PowerShell 中的多行注释 [英] Multiline comment in PowerShell
本文介绍了PowerShell 中的多行注释的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们可以在 PowerShell 中一起注释多行吗?
Can we comment multiple lines together in PowerShell?
我尝试寻找,但没有找到任何答案.如果脚本太长,手动注释每一行是很烦人的.
I tried looking, but I didn't find any answer. It's quite irritating to comment each line manually if the script is too long.
推荐答案
在 PowerShell v2 和更新版本中,对多行注释使用以下语法:
In PowerShell v2 and newer, use the following syntax for the multiline comments:
<# a
b
c #>
这篇关于PowerShell 中的多行注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文