Summary: Boe Prox shows how to view all values of an enum.
How can I view all of the available values of an enum?
Use the [Enum]::GetNames() method, for example:
PS C: > [Enum]::GetNames([System.ConsoleColor])
Black
DarkBlue
DarkGreen
DarkCyan
DarkRed
DarkMagenta
DarkYellow
Gray
DarkGray
Blue
Green
Cyan
Red
Magenta
Yellow
White
0 comments