Skip to content

Instantly share code, notes, and snippets.

@guitarrapc
Last active September 4, 2015 16:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guitarrapc/03935f5b41466093e0c5 to your computer and use it in GitHub Desktop.
Save guitarrapc/03935f5b41466093e0c5 to your computer and use it in GitHub Desktop.
(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