diff options
author | Andrew Ryan Davis <AndrewDavis1191@gmail.com> | 2020-08-17 02:09:14 -0700 |
---|---|---|
committer | Andrew Ryan Davis <AndrewDavis1191@gmail.com> | 2020-08-20 12:30:32 -0700 |
commit | cf5b2a36e0e89dc576cc66e0878ec3d24a8ab8c2 (patch) | |
tree | 97ad46bfd18866e6f294a002a5295191cf18e8ee | |
parent | 2e9734975e3a12d37ea3a899c3d98b2a565e0a40 (diff) |
Adjusting truthy falsy section
-rw-r--r-- | powershell.html.markdown | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/powershell.html.markdown b/powershell.html.markdown index 166b67a0..be8311b7 100644 --- a/powershell.html.markdown +++ b/powershell.html.markdown @@ -163,26 +163,10 @@ function test ($value) { test ($null) # => False test (0) # => False test ("") # => False -test [] # => True *[] Not valid in Powershell, creates null-valued expression +test [] # => True *[] calls .NET classes; creates '[]' string when passed to func test ({}) # => True test @() # => False -<# -IsPublic IsSerial Name BaseType --------- -------- ---- -------- -True True Int32 System.ValueType -True True Int32 System.ValueType -True True String System.Object -You cannot call a method on a null-valued expression. -At line:4 char:1 -+ $test3.getType() -+ ~~~~~~~~~~~~~~~~ - + CategoryInfo : InvalidOperation: (:) [], RuntimeException - + FullyQualifiedErrorId : InvokeMethodOnNull - -True True ScriptBlock System.Object -True True Object[] System.Array -#> #################################################### ## 2. Variables and Collections |