It′s mid-fall which means a new version of C# is coming soon. It′s time to find out what updates will soon appear in the language. Although C#12 has fewer features than previous versions, it still...
they actually have to reference the function by string name.
This is true of a lot of the opt-in language features though, isn’t it? For example, you can just make an .Add method on any IEnumerable type and get collection initializer syntax supported for it, even as an extension method. The same works for Dispose on ref structs I believe, and I remember there being a few other places where this was true (GetAwaiter I think?).
This is true of a lot of the opt-in language features though, isn’t it? For example, you can just make an
.Add
method on anyIEnumerable
type and get collection initializer syntax supported for it, even as an extension method. The same works forDispose
on ref structs I believe, and I remember there being a few other places where this was true (GetAwaiter
I think?).