void
cannot be instantiated and is used for the cast
operator
null
has one instance only (namely: $null
)
object
from which all other types, except null
are derived, either directly or indirectly. bool
char
int
long
float
(single
is a synonym for float
)
double
decimal
switch
which is used for parameters.
string
array
hash table
xml
regex
ref
scriptblock
math
(used for constants e
, pi
and functions like abs()
, max()
, sin()
etc.)
ordered
(which is considered a pseudo type)
pscustomobject
(which is ony used for conversions) getType()
: $foo = 42 $foo.getType()
-is
operator checks if a value is of a given type. -as
operator casts a value into a different type. class
keyword.