mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-09 21:07:40 +02:00
Add datatype to param()
This commit is contained in:
@ -11,10 +11,11 @@
|
||||
Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param($City = "")
|
||||
if ($City -eq "" ) { $City = read-host "Enter the city name" }
|
||||
param([string]$City = "")
|
||||
|
||||
try {
|
||||
if ($City -eq "" ) { $City = read-host "Enter the city name" }
|
||||
|
||||
write-progress "Reading worldcities.csv..."
|
||||
$Table = import-csv "$PSScriptRoot/../Data/worldcities.csv"
|
||||
|
||||
|
Reference in New Issue
Block a user