Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(GH-10505) Add note on property name ordering #10507

Conversation

michaeltlombardi
Copy link
Contributor

@michaeltlombardi michaeltlombardi commented Oct 11, 2023

PR Summary

Prior to this change, the "Enumerating property names" section in Everything you wanted to know about PSCustomObject didn't clarify that the results from using Get-Member and the member-access operator to enumerate property names differs.

Get-Member returns the properties in alphabetical order while member-access returns them in the order they were defined on the object.

This change:

PR Checklist

  • Descriptive Title: This PR's title is a synopsis of the changes it proposes.
  • Summary: This PR's summary describes the scope and intent of the change.
  • Contributor's Guide: I have read the contributors guide.
  • Style: This PR adheres to the style guide.

Prior to this change, the "Enumerating property names" section
in _Everything you wanted to know about PSCustomObject_ didn't
clarify that the results from using `Get-Member` and the
member-access operator to enumerate property names differs.

`Get-Member` returns the properties in alphabetical order while
member-access returns them in the order they were defined on the
object.

This change:

- adds a note to clarify this difference.
- Resolves MicrosoftDocs#10505
- Fixes AB#169145
@learn-build-service-prod
Copy link
Contributor

Learn Build status updates of commit 0f8c3c2:

✅ Validation status: passed

File Status Preview URL Details
reference/docs-conceptual/learn/deep-dives/everything-about-pscustomobject.md ✅Succeeded View (>=powershell-5.1)

For more details, please refer to the build report.

For any questions, please:

@sdwheeler sdwheeler merged commit af3a44c into MicrosoftDocs:main Oct 11, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enumerating Property Names produce different results , would be good to point out difference
2 participants