[英]What does @() mean in Powershell?
I've seen this a few times in Powershell, and was curious what it meant : 我在Powershell中已经看过几次了,并且好奇它意味着什么:
@()
For example, in this block : 例如,在此块中:
[datetime]$StartDate = ([datetime]::now.ToShortDateString())
$TodaysMail = @()
thanks ! 谢谢 !
The @
indicates an array. @
表示一个数组。 @()
simply creates an empty array. @()
只是创建一个空数组。 Ie this snippet: 即这个片段:
$TodaysMail = @()
Would yield a variable TodaysMail
representing an empty array. 会产生一个表示空数组的变量
TodaysMail
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.