且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Powershell中比较关联数组?

更新时间:2021-09-18 21:51:36

除了编写用于比较每个键的值的函数(如果该值不是原始对象的值,则可能是递归的)之外,我没有其他方法可知.但是,PowerShell中的关联数组只是.NET类型(System.Collections.Hashtable).您可能想要通过向问题中添加 .NET 标记来向更广泛的.NET受众开放此问题.

There isn't a way that I know of except writing a function to compare each key's value (potentially recursive if the value is something other than a primitive object). However, associate arrays in PowerShell are just .NET types (System.Collections.Hashtable). You might want to open this question up to the broader .NET audience by adding the .NET tag to your question.