docs icon indicating copy to clipboard operation
docs copied to clipboard

Confusing C# 13 example

Open richlander opened this issue 1 year ago • 0 comments

Describe the issue or suggestion

I find the example for implicit index example to be confusing: https://github.com/dotnet/docs/blob/6ae8f6122a9cc8c23d1e4e4d208e06d023123961/docs/csharp/whats-new/csharp-13.md#L47.

The primary issue is that I have to guess what v and S are. I realize that they are not important for the example, however, they are the first bits of code that I have to look at and parse. Also, is this code that one would ever write? Maybe this feature is just too niche to get this much fanfare?

I like these pattern matching examples: https://learn.microsoft.com/dotnet/csharp/fundamentals/functional/pattern-matching.


Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

richlander avatar May 07 '24 23:05 richlander