Title: `?.` operator treats `DBNull` as null causing the methods to not execute · Issue #11084 · PowerShell/PowerShell · GitHub
Open Graph Title: `?.` operator treats `DBNull` as null causing the methods to not execute · Issue #11084 · PowerShell/PowerShell
X Title: `?.` operator treats `DBNull` as null causing the methods to not execute · Issue #11084 · PowerShell/PowerShell
Description: Since the implementation of ?. operator treats DBNull, NullString and AutomationNull as null, we cannot call any method on them using ?. operator. The concern is only for DBNull as for other types we truly consider them as null. Steps to...
Open Graph Description: Since the implementation of ?. operator treats DBNull, NullString and AutomationNull as null, we cannot call any method on them using ?. operator. The concern is only for DBNull as for other types ...
X Description: Since the implementation of ?. operator treats DBNull, NullString and AutomationNull as null, we cannot call any method on them using ?. operator. The concern is only for DBNull as for other types ...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/11084
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`?.` operator treats `DBNull` as null causing the methods to not execute","articleBody":"Since the implementation of `?.` operator treats DBNull, NullString and AutomationNull as null, we cannot call any method on them using `?.` operator. The concern is only for DBNull as for other types we truly consider them as null.\r\n\r\n# Steps to reproduce\r\n\r\n```powershell\r\n[System.DBNull]::Value?.GetTypeCode()\r\n```\r\n\r\n# Expected behavior\r\n\r\n```none\r\nDBNull\r\n```\r\n\r\n# Actual behavior\r\n\r\n```none\r\nnull\r\n```\r\n\r\n# Environment data\r\n\r\n\u003c!-- provide the output of $PSVersionTable --\u003e\r\n\r\n```none\r\nBuild after PR https://github.com/PowerShell/PowerShell/pull/10960 is merged\r\n```\r\n","author":{"url":"https://github.com/adityapatwardhan","@type":"Person","name":"adityapatwardhan"},"datePublished":"2019-11-15T19:48:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/11084/PowerShell/issues/11084"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9044c806-2ebc-6aa8-dbf9-bcbb680335dd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AB60:17C7E7:386B74:4AF6F8:6A5BC95B |
| html-safe-nonce | 5ef392825ae35e53b94ad578ae3e561887b5268f2fb8a06a2afa125799c3ddb7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjYwOjE3QzdFNzozODZCNzQ6NEFGNkY4OjZBNUJDOTVCIiwidmlzaXRvcl9pZCI6IjIzMTg4NTcyMTcxNzE1MDc1NDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ff329584178ef518b400a96dc2b03fa991626fe321db0f468087d4c8ca7a8e75 |
| hovercard-subject-tag | issue:523655614 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/11084/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f661efd39c5de9dca5168b0d92e5ee5ba463bac519d7e1c31aab99273346f6a3/PowerShell/PowerShell/issues/11084 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f661efd39c5de9dca5168b0d92e5ee5ba463bac519d7e1c31aab99273346f6a3/PowerShell/PowerShell/issues/11084 |
| og:image:alt | Since the implementation of ?. operator treats DBNull, NullString and AutomationNull as null, we cannot call any method on them using ?. operator. The concern is only for DBNull as for other types ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | adityapatwardhan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width