Let’s start with Powershell – part2
Excercise – Solved
PS C:\> $a=3 PS C:\> write-host $a 3 PS C:\> $a.GetType() IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True Int32 System.ValueType PS C:\> $b=3.3 PS C:\> Write-Host $b 3.3 PS C:\> $c="3.3" PS C:\> Write-Host $c 3.3 PS C:\> $b.GetType() IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True Double System.ValueType PS C:\> $c.GetType() IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True String System.Object PS C:\> $d=$a+$b PS C:\> $d 6.3 PS C:\> $d.GetType() IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True Double System.ValueType PS C:\> $x=3.4 PS C:\> $x 3.4 PS C:\> $x.ToInt32($null) 3 PS C:\> $y=3.6 PS C:\> $y.ToInt32($null) 4