Questions tagged [automation-null]

PowerShell's way of representing the absence of output from a pipeline, via [System.Management.Automation.Internal.AutomationNull]::Value, which can be thought of as an "array-valued $null".

3 questions
12
votes
3 answers

Why and how are these two $null values different?

Apparently, in PowerShell (ver. 3) not all $null's are the same: >function emptyArray() { @() } >$l_t = @() ; $l_t.Count 0 >$l_t1 = @(); $l_t1 -eq $null; $l_t1.count; $l_t1.gettype() 0 IsPublic IsSerial Name …
David I. McIntosh
  • 2,038
  • 4
  • 23
  • 45
7
votes
0 answers

Are there 2 kinds of $null in PowerShell?

I've stumbled across an odd situation in PowerShell 5.1 (Windows 10) where ConvertTo-Json produces {} instead of null for an apparently null valued object: [CmdletBinding()] param() function main() { $foo1 = $null Write-Verbose ("foo1 null?…
Marc
  • 13,011
  • 11
  • 78
  • 98
0
votes
2 answers

Unable to open ChromeDriver in C# with Selenium

''' using OpenQA.Selenium.Chrome; using OpenQA.Selenium; // to open chrome namespace NewTest { class EntryPoint { static void Main() { IWebDriver driver = new ChromeDriver(); …