Skip to content

Latest commit

 

History

History

Null-converted-to-empty-string

Null converted to empty string

When null is passed to a .NET method as a string parameter then null is converted to an empty string.

In PowerShell 2.0 it is simply not possible to pass null as null to such methods from scripts (without adding .NET helper classes to work around).

In PowerShell 3.0 it is possible with a special value used instead of null: [System.Management.Automation.Language.NullString]::Value. But this workaround does not eliminate the problem.

Scripts


  • Microsoft Connect 307821