Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Creating/Working With Nullable Objects in PowerShell - How?

$
0
0

Hi,

how do I create and work with Nullable objects in PowerScript.

None of the tips I found worked:

> ([System.Nullable[System.Int32]]1).GetType().Name
Int32

> ([System.Nullable[System.Int32]]$null).GetType().Name
You can't call a method on a null value expression.

> (New-Object System.Nullable[Int32] 1).GetType().Name
Int32

Any help is appreciated!


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>