Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
(1,2,3) -ne $null # 1 と 2が返る。つまり if ((1,2,$null) -ne $null){} なら true 扱い
# not null が返る
$array = @($null,1,2);
if ($array -eq $null)
{
"null"
}
else
{
"not null"
}
# null が返る
$array = @($null,$null,1,2);
if ($array -eq $null)
{
"null"
}
else
{
"not null"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.