I have this in my code
[CmdletBinding()]
Param(
[string[]]$NameArray = @(),
)
NameArray += "data"
Write-Host "Name is : $NameArray[0]"
The above appends [0]
to the output. so I get
Name is data[0]
Any suggestion on how I can tell it that the [0] is the index and not text to be appended ?