René's URL Explorer Experiment


Title: ToString has invalid/no console output after any property, method or function is accessed · Issue #20694 · PowerShell/PowerShell · GitHub

Open Graph Title: ToString has invalid/no console output after any property, method or function is accessed · Issue #20694 · PowerShell/PowerShell

X Title: ToString has invalid/no console output after any property, method or function is accessed · Issue #20694 · PowerShell/PowerShell

Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerShell 5.1 and PowerShell. Steps to reprodu...

Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...

X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...

Opengraph URL: https://github.com/PowerShell/PowerShell/issues/20694

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ToString has invalid/no console output after any property, method or function is accessed","articleBody":"### Prerequisites\n\n- [X] Write a descriptive title.\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\n- [X] Search the existing issues.\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\n\n### Steps to reproduce\n\nCreate a powershell class with an override for ToString(). Call any property, method or function on it. And finally output it to the console again. See below for an example script including its console output as comments.\n\n### Expected behavior\n\n```console\nIt always calling the ToString() and always correctly forming console output regardless of what function, method, or property was accessed previously.\n```\n\n\n### Actual behavior\n\n```console\nclass TestClass {\r\n  hidden [bool]$_foo = $false\r\n\r\n  [void]Enable() {\r\n    $this._foo = $true\r\n  }\r\n\r\n  [void]Disable() {\r\n    $this._foo  = $false\r\n  }\r\n\r\n  [string]ToString() {\r\n    return ('Value is: {0}' -f $this._foo.ToString())\r\n  }\r\n}\r\n\r\n#1\r\n[Collections.Generic.Dictionary[int, TestClass]]$testClassDict = @{}\r\n1..4 | ForEach-Object { $testClassDict[$_] = [TestClass]::new() }\r\n$testClassDict\r\n\u003c#\r\nKey Value\r\n--- -----\r\n  1 Value is: False\r\n  2 Value is: False\r\n  3 Value is: False\r\n  4 Value is: False\r\n#>\r\n$testClassDict[1]\r\n# Value is: False\r\n$testClassDict[1].ToString()\r\n# Value is: False\r\n$testClassDict[1]\r\n#\r\n#\r\n$testClassDict\r\n\u003c#\r\nKey Value\r\n--- -----\r\n  1 Value is: False\r\n  2 Value is: False\r\n  3 Value is: False\r\n  4 Value is: False\r\n#>\r\n\r\n\r\n\r\n#2\r\n[TestClass]$_testClass = [TestClass]::new()\r\n$_testClass\r\n# Value is: False\r\n$_testClass | Write-Host\r\n# Value is: False\r\n$_testClass.Enable()\r\n$_testClass | Write-Host\r\n# Value is: False\r\n$_testClass\r\n#\r\n#\r\n$_testClass.ToString()\r\n# Value is: False\n```\n\n\n### Error details\n\n_No response_\n\n### Environment data\n\n```powershell\nName                           Value\r\n----                           -----\r\nPSVersion                      7.3.9\r\nPSEdition                      Core\r\nGitCommitId                    7.3.9\r\nOS                             Microsoft Windows 10.0.17763\r\nPlatform                       Win32NT\r\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion      2.3\r\nSerializationVersion           1.1.0.1\r\nWSManStackVersion              3.0\n```\n\n\n### Visuals\n\n![image](https://github.com/PowerShell/PowerShell/assets/2544867/6f81b7fd-29cf-4430-b811-455f5f320728)\r\n","author":{"url":"https://github.com/agowa","@type":"Person","name":"agowa"},"datePublished":"2023-11-16T14:05:02Z","url":"https://github.com/PowerShell/PowerShell/issues/20694"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d4782ea2-4cf7-ba42-0e4a-39de2c57f953
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC384:238DBE:18F8AB:235383:6AFD501E
html-safe-nonce1e18906d520f8e86224f1e14b28cd7b314ab9f1bf133aeb6d8f7bd89028aa45f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzg0OjIzOERCRToxOEY4QUI6MjM1MzgzOjZBRkQ1MDFFIiwidmlzaXRvcl9pZCI6IjcwMzgyMDg1Mzk0ODI3Mzg3MTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac08e883bc8345552e44c3fdd9eccb8d67771a9fe376478b0803b4b0ebb6ef8396
hovercard-subject-tagissue:1996934270
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/20694/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1742e3e43e1dcb18b90323d15d45d3043da5939a1c14f033b21d94fe20e8eb16/PowerShell/PowerShell/issues/20694
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1742e3e43e1dcb18b90323d15d45d3043da5939a1c14f033b21d94fe20e8eb16/PowerShell/PowerShell/issues/20694
og:image:altPrerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameagowa
hostnamegithub.com
expected-hostnamegithub.com
None66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e
turbo-cache-controlno-preview
go-importgithub.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id49609581
octolytics-dimension-repository_nwoPowerShell/PowerShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49609581
octolytics-dimension-repository_network_root_nwoPowerShell/PowerShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb6f01f7cb9f35f8c09949773241a3d49dd04b340
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/PowerShell/PowerShell/issues/20694#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F20694
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F20694
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=PowerShell%2FPowerShell
Reloadhttps://github.com/PowerShell/PowerShell/issues/20694
Reloadhttps://github.com/PowerShell/PowerShell/issues/20694
Reloadhttps://github.com/PowerShell/PowerShell/issues/20694
PowerShellhttps://github.com/PowerShell
PowerShellhttps://github.com/PowerShell/PowerShell
Codehttps://github.com/PowerShell/PowerShell
Issues1.3k (1.3k)https://github.com/PowerShell/PowerShell/issues
Pull requests365 (365)https://github.com/PowerShell/PowerShell/pulls
Discussionshttps://github.com/PowerShell/PowerShell/discussions
Actionshttps://github.com/PowerShell/PowerShell/actions
Projectshttps://github.com/PowerShell/PowerShell/projects
Security and quality3 (3)https://github.com/PowerShell/PowerShell/security
Insightshttps://github.com/PowerShell/PowerShell/insights
https://github.com/PowerShell/PowerShell
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/20694
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/20694
ToString has invalid/no console output after any property, method or function is accessedhttps://github.com/PowerShell/PowerShell/issues/20694#top
Needs-TriageThe issue is new and needs to be triaged by a work group.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Needs-Triage%22
https://github.com/agowa
Klaus Frank (agowa)https://github.com/agowa
on Nov 16, 2023https://github.com/PowerShell/PowerShell/issues/20694#issue-1996934270
latest released versionhttps://github.com/PowerShell/PowerShell/releases
FAQhttps://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md
Differences between Windows PowerShell 5.1 and PowerShellhttps://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell
https://private-user-images.githubusercontent.com/2544867/283476021-6f81b7fd-29cf-4430-b811-455f5f320728.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTQ5ODYzMTQsIm5iZiI6MTc5NDk4NjAxNCwicGF0aCI6Ii8yNTQ0ODY3LzI4MzQ3NjAyMS02ZjgxYjdmZC0yOWNmLTQ0MzAtYjgxMS00NTVmNWYzMjA3MjgucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTExOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjExMThUMDcxMzM0WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZWNhZjc4NjY2MzIwZjA1ZDQ2OGM4NTA1MzU2OWU4NmI5ZmY0NGQzYzUzMDdkY2RiODQ3MmNjNDk1NmIzOTE2MCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.ZFF-Y2TXg9Vy8eHdEtGu2niD-Ta5eLGWtnhNMWHO0PU
Klaus Frank (agowa)https://github.com/agowa
Needs-TriageThe issue is new and needs to be triaged by a work group.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Needs-Triage%22
on Nov 16, 2023https://github.com/PowerShell/PowerShell/issues/20694#event-10981090188
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Nov 16, 2023https://github.com/PowerShell/PowerShell/issues/20694#issuecomment-1815237689
CompletionPredictorhttps://github.com/PowerShell/CompletionPredictor
PowerShell/CompletionPredictor#35https://github.com/PowerShell/CompletionPredictor/issues/35
Inconsistent stringification of [pscustomobject] instances - calling .ToString() on custom objects yields the empty string #6163https://github.com/PowerShell/PowerShell/issues/6163
https://github.com/B-Art
Bart van den Donk (B-Art)https://github.com/B-Art
on Nov 18, 2023https://github.com/PowerShell/PowerShell/issues/20694#issuecomment-1817565366
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Nov 18, 2023https://github.com/PowerShell/PowerShell/issues/20694#issuecomment-1817581351
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Nov 19, 2023https://github.com/PowerShell/PowerShell/issues/20694#issuecomment-1817881261
Bart van den Donk (@B-Art)https://github.com/B-Art
https://github.com/B-Art
Bart van den Donk (B-Art)https://github.com/B-Art
on Nov 19, 2023https://github.com/PowerShell/PowerShell/issues/20694#issuecomment-1817887071
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on Nov 20, 2023https://github.com/PowerShell/PowerShell/issues/20694#issuecomment-1819897786
Bart van den Donk (@B-Art)https://github.com/B-Art
Sign up for freehttps://github.com/signup?return_to=https://github.com/PowerShell/PowerShell/issues/20694
Sign in to commenthttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/20694
Needs-TriageThe issue is new and needs to be triaged by a work group.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Needs-Triage%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.