-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.
Description
Type data for System.Array type contains single alias property Count -> Length. It was good for consistency, as ICollection.Count is implemented explicitly by arrays and was not visible while other collections types do not have Length property. But since PowerShell v3 it is possible to reference explicitly implemented interface members. So, this alias property no longer necessary. It also cause some headaches with ConvertTo-Json cmdlet:
PS> ConvertTo-Json (,1)
[
1
]
PS> ConvertTo-Json ([PSObject](,1))
{
"value": [
1
],
"Count": 1
}
PS> Remove-TypeData System.Array
PS> ConvertTo-Json (,1)
[
1
]
PS> ConvertTo-Json ([PSObject](,1))
[
1
]mklement0
Metadata
Metadata
Assignees
Labels
Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.