Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

1.2. Built-in Types

PowerShell not only allows us access to many types of objects and lets us modify them in a uniform way—it also includes several built-in types that are worth knowing, as they are the ones we will be using in our everyday work with the shell. To be honest, PowerShell does not build those types from scratch; it relies heavily on the .NET framework, and all the built-in types are really .NET types. The shell designers have extended those types and added special syntax shortcuts to the language to make it easier to use them.

1.2.1. Strings and String Operations

Character strings are arguably the most commonly used data type in any programming language. Most likely that is the case because strings contain free-form data and are used to transport data across system boundaries. PowerShell's string support is built on top of the .NET System.String object type. That means that a string in PowerShell will have all operations that .NET strings have. On top of that, strings have a number of useful extensions that increase the expressiveness and effectiveness of string manipulation.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint