Changes

Jump to: navigation, search

Basic Windows PowerShell 1.0 Types

33 bytes added, 19:22, 14 May 2009
no edit summary
== 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