• “Now and today are both static properties from the system.datetime .NET Framework class that return instances of the class. To call a static property, place the class name inside square brackets, use two colons, and then add the property name. To prove that it is a datetime object that is returned, use the gettype method that is always available from any system.object. This is shown here:

    PS C:\> [datetime]::now”

    tags: Powershell

    • Now and today are both static properties from the system.datetime .NET Framework class that return instances of the class. To call a static property, place the class name inside square brackets, use two colons, and then add the property name. To prove that it is a datetime object that is returned, use the gettype method that is always available from any system.object. This is shown here:

       

      PS C:\> [datetime]::now

  • tags: Powershell

  • tags: Powershell

Posted from Diigo. The rest of my favorite links are here.

Advertisements