#powershell #function PowerShell: Add GetValueOrDefault Method to a Hashtable https://bit.ly/3QwHW0Q via PlanetPowerShell
@DoctorDNS @sasstu it's already in .NET -- but the #PowerShell team does not enable basic #dotnet functionality if it came out after .NET 2.0 -- so you don't have access to #ExtensionMethods unless you map them into the .NET 1.0 era "ETS"
Here's the method in .NET:
https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.collectionextensions.getvalueordefault?view=net-7.0
Here's the pre-github era feature request:
https://github.com/PowerShell/PowerShell/issues/2226