header image

Scripting Games–integer parameters

Posted by: | May 6, 2013 | No Comment |

I keep seeing paramter constructs like this:

[int]$age = ’90’

Why set the parameter to an integer and then set the default as a string.  PowerShell will convert but it just doesn’t make sense.

All you need is

[int]$age = 90

under: PowerShell original, Scripting Games