Hacker News new | ask | show | jobs
by SideburnsOfDoom 171 days ago
> be aware it's going to have a funky non C# compliant field name

That's longstanding behaviour. Ever since features such as anonymous types or lambdas arrived, they mean that classes and methods need to be generated from them. And of course these need names, assigned by the compiler. But these names are deliberately not allowed from the code. The compiler allows itself a wider set of names, including the "<>" chars.

I have heard them referred to as "unspeakable names" because it's not that they're unknown, you literally can't say them in the code.

e.g. by Jon Skeet, here https://codeblog.jonskeet.uk/category/async/ from 2013.

> they’re all "unspeakable" names including angle-brackets, just like all compiler-generated names.