-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

PowerShell 7 Workshop
By :

Value types are the building blocks of programming in PowerShell. Other languages have primitive types that derive from the base classes of the relevant language; PowerShell does not because (all together now) everything is an object and is derived from the System.Object
class in .NET. In general, value types in PowerShell are analogous to (but not exactly the same as) primitives. The memory location that holds a value-type object holds the actual data. There are also reference types, which we’ll look at later, that hold a reference to the actual data; the data is held elsewhere, possibly in multiple locations. Value-type data is a fixed size, in bits. Value types have a single value. To illustrate, let’s look at some value types. We’ll start with the simplest value type, the Boolean type.
Memory locations – CompSci101 alert!
Data is stored in two different places in memory, the stack, and the heap. The stack is for static allocations...
Change the font size
Change margin width
Change background colour