diff --git a/RuleDocumentation/PossibleIncorrectComparisonWithNull.md b/RuleDocumentation/PossibleIncorrectComparisonWithNull.md index 15a11b1fd..d12f77a96 100644 --- a/RuleDocumentation/PossibleIncorrectComparisonWithNull.md +++ b/RuleDocumentation/PossibleIncorrectComparisonWithNull.md @@ -37,3 +37,10 @@ function Test-CompareWithNull } } ``` + +## Try it Yourself + +``` PowerShell +if (@() -eq $null) { 'true' } else { 'false' } # Returns false +if ($null -ne @()) { 'true' } else { 'false' } # Returns true +```