Changes

Jump to: navigation, search

Basic Windows PowerShell 1.0 Types

36 bytes added, 19:57, 27 October 2016
m
Text replacement - "<table border="0" cellspacing="0">" to "<table border="0" cellspacing="0" width="100%">"
<googlehtmlet>BUY_WPSpowershell</googlehtmlet>
Windows PowerShell 1.0 supports the full range of .Net number types as outlined in the following table:
<googlehtmlet>ADSDAQBOX_FLOWadsdaqbox_flow</googlehtmlet>
<table border="1" cellpadding="5" cellspacing="0" id="E3B" style="border-collapse: collapse; border-color:#cccccc; border-style: solid; border-width: 1px; margin-bottom:20px">
<tr bgcolor="#cccccc" style="color:black" valign="top">
== PowerShell Boolean Type ==
Boolean values (which can be either 1 or 0) are defined in PowerShell using the .Net ''System.Boolean'' type (the short from of which is [bool]). For example, the following command assigns ''true'' to a variable of boolean type:
<pre>
== Windows PowerShell Type Casting ==
Clearly, PowerShell will make a judgement judgment as to a value's type. Most of the time this is fine, but occasionally it is necessary to specifically specify the type. This is achieved using ''type casting''. Type casting involves preceding the value or variable with the short or long variable name enclosed in square brackets. For example, to force variable $x to be double (as opposed to the default Int32):
<pre>
True True String System.Object
</pre>
 
<google>BUY_WPS_BOTTOM</google>

Navigation menu