powershell自增i++,++i练习
[int]$i = 1
[int]$c = $i++ + $i++ + ++$i + $i++ + $i
write-Output($c)
16
[int]$i = 5
[int]$c = $i++ + $i++ + ++$i + $i++ + $i
write-Output($c)
36
[int]$i = 1
[int]$c = ++$i + ++$i + $i++ + ++$i + $i
write-Output($c)
18
powershell中使用强类型
变量为byte类型
变量为byte类型,赋值-0.5

变量为byte类型,赋值-1

变量为int类型,存入字符串和小数
int类型中,使用字符赋值

int类型中,使用字符串赋值

int类型中,使用浮点数赋值

不限定使用强弱类型,定义数组
[string]$name = "Ms tang"
[float]$height = 178.00
[int]$age = 24
[string]$profession = "computer science and technology"
[string]$school = "university"
[string]$GraduationDate = "2020.6.30"
$array_information = $name,$height,$age,$profession,$school,$GraduationDate
$array_information[0]
