3 ms·
Indeed! I think one of my favourites has to be: [xml]$someXmlDocument = Get-Content "path\to\file.xml" And you get a deserialized version of the XML text.
by GenericsMotors 9y ago
Indeed! I think one of my favourites has to be:
[xml]$someXmlDocument = Get-Content "path\to\file.xml"
And you get a deserialized version of the XML text.
Also the fact that you can use types when declaring function arguments, removing the need to manually test if an object of the desired type was passed.
Powershell definitely strikes a good balance on type safety for a scripting language.