Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Use PowerShell to Reveal the Size of an [int16]

$
0
0

Summary: Use Windows PowerShell to show the minimum value and the maximum value of an [int16].

Hey, Scripting Guy! Question I need to use an [int16], but I am not sure if it is big enough to hold the number I want to use. How can I determine the minimum and the maximum value of an [int16]?

Hey, Scripting Guy! Answer Use the static MinValue and MaxValue properties from the [int16], as shown here.

13:11 C:\> [int16]::MaxValue

32767

13:11 C:\> [int16]::MinValue

-32768

Note This technique also works for [int32], [int64], and [double].


Viewing all articles
Browse latest Browse all 3333

Trending Articles



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