Chapter 3

  1. In an object-oriented language, every object that is being used and returned is of an explicit object type. You have the benefit of encapsulation, polymorphism, and inheritance, which makes programming easier and fault-tolerant.
  2. # singleline comment  and <# multiline comment #>.
  3. With regions, you can divide your code into separate blocks and name them. It is a good way to hide unnecessary code. #region newregion code #endregion
  4. You can use the same cmdlets for every PSProvider and list all objects.
  5. $stringvar = 'string' or [string]$stringvar = 'string'.
  6. Get-, Set-, New-, Remove- 
  7. Get-Command
  8. Get-Help cmdlet
  9. In general, a pipeline sends the output of the preceding function or cmdlet to the next one. Its output is bound to the parameters of the following cmdlets, by type. The pipeline always executes from left to right. 
  10. [String][Char][Byte], [Int][Long][Decimal][Single], [Double], [Bool], [DateTime][XML], [Array][Hashtable]

  11. if...else, if...elseif, switch
  12. for loop – iterates values
    do until – executes code until a condition is fulfilled
    do while – executes code while a condition is fulfilled - at least one iteration
    while loop – executes code while condition is fulfilled 
    foreach loop – iterates through all objects in a list or array
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.77.71