| [ Web Proxy ] |
| Viewing: https://riptutorial.com/powershell/example/18116/format-string | [Back] [Original] |
[logo rip]
$hash = @{ city = 'Berlin' }
$result = 'You should really visit {0}' -f $hash.city
Write-Host $result #prints "You should really visit Berlin"
Format strings can be used with the -f operator or the static [String]::Format(string format, args) .NET method.
| Web Proxy Viewer | New URL | Original Page |