Tweet

Conversation

Daniel Markham
Reply
Show replies
And it's a C# 7 feature. I saw the tuple pattern matching stuff back then, but never occurred to me to look at user defined deconstruction.
1
Show replies
You can have multiple deconstructs, but the same rules apply as they do with Extension methods. So the type one wins out as long as the deconstruction out parameters match.
1
Replying to and
See also walk thru
youtube.com
How type deconstruction keeps your C# code clean
Check out my courses: https://nickchapsas.comBecome a Patreon and get source code access: https://www.patreon.com/nickchapsasHello everybody I'm Nick and in ...
Show replies
Replying to and
I like deconstructors - It makes it so much more pleasant when wrapping domain logic (e.g. ways a product number could be structured, or similar things) that you can output them 'nicely' again.
Show additional replies, including those that may contain offensive content
Show

Trending now

What’s happening

Holidays
LIVE
It's Groundhog Day!
#PamAndTommy
Now Streaming on Hulu
Promoted by Pam & Tommy on Hulu
R&B & soul · Trending
Summer Walker
2,881 Tweets
Variety
Last night
Whoopi Goldberg suspended from 'The View' for Holocaust remarks
Sports · Trending
Washington Commanders
Trending with #TakeCommand, Dan Snyder