且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

检查 PowerShell 对象是否存在的***方法?

更新时间:2021-12-30 06:22:22

我会坚持使用 $null 检查,因为除了 '' 之外的任何值(空字符串), 0, $false$null 将通过检查: if ($ie) {...}.

I would stick with the $null check since any value other than '' (empty string), 0, $false and $null will pass the check: if ($ie) {...}.