Fred Silberberg

Results 412 comments of Fred Silberberg

This has been implemented since C# 7.3.

> An alternative tactic could be to come up with a smaller project to build. I would probably be fine with just bootstrapping Compilers.sln.

Another alternative would be to simply use the `method` target here, and make it an error if it's not in the same location as the top-level statements.

> > make it an error if it's not in the same location as the top-level statements. > > What do you mean by "same location" in this context? Same...

You can also do: ```cs [RequiresPreviewFeatures] partial class Program { } ```

I'm willing to champion this extension, with the caveat that it won't come in 9 :)

Possibly. It would still depend on whether we add anything else to the definition of a record type. I'm not sure whether we'd add a copy constructor, for example, or...

@leandromoh this will need an actual spec. Would you be willing to take a stab at writing one? It would need to be an extension to the existing records proposal.

Probably, but then every piece of code generates an anonymous type would need to be recompiled to work with this feature.

I suppose it might be fine. Still, we need a spec to actually evaluate this :)