Skip to content
Discussion options

You must be logged in to vote

What are the use cases where all of the following conditions apply?

  1. You need to access property names by reflection.
  2. The single allocation significantly affects performance.
  3. Creating a custom struct is too cumbersome.

There certainly are cases where one or two of those conditions are true, but I think all three need to be true often enough to make this a worthwhile feature.

Also, I'm fairly certain #anonymous struct is not going to happen. C# has been very hesitant to introduce dialects and while #nullable enable in C# 8.0 does that, that's for the "billion dollar mistake", not a small feature like this one.

Replies: 22 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by YairHalberstadt
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
7 participants
Converted from issue

This discussion was converted from issue #2551 on October 28, 2020 08:29.