PowerShell / PowerShell/PowerShell

Get-Member doesn't consistently show members that are explicit interface implementations as such

Open
#17,699 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Needs-Triage WG-Cmdlets
Dominant language
C#
Stars
55.5k
Forks
8.5k
Avg merge
1d 2h
Merged PRs (30d)
88

Description

Prerequisites
Steps to reproduce
Get-Member -InputObject (1, 2) Add, Count
Expected behavior
TypeName: System.Object[]

Name  MemberType Definition
----  ---------- ----------
Add   Method     int IList.Add(System.Object value)
Count Property   int ICollection.Count {get;}
Actual behavior
TypeName: System.Object[]

Name  MemberType Definition
----  ---------- ----------
Add   Method     int IList.Add(System.Object value)
Count Property   int Count {get;}
Error details

No response

Environment data
PowerShell Core 7.3.0-preview.5
Visuals

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the provided Get-Member reproduction on PowerShell 7.3.0-preview.5 or a current build, then trace the Get-Member implementation and its member-reflection handling. Done means explicit interface members such as ICollection.Count are displayed consistently with IList.Add, matching the expected output.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.