3 ms·
That sounds a lot like Top-level Statements in the .Net world. Personally I don’t use that feature because I’m old and get confused if things are magic but can
by lotsoweiners 3y ago
That sounds a lot like Top-level Statements in the .Net world. Personally I don’t use that feature because I’m old and get confused if things are magic but can certainly see the benefit for the newer devs.
- starik36 3y agoYeah, no doubt inspired by the .NET feature. I use it all the time for throwaway console apps.
- jonathanlydall 3y agoI’m also a somewhat old school C# dev and the main reason I don’t use top level statements is that they only work in a single file of an application, so that single file is different from every other file in your solution. It’s okay if you’re only writing a single file, and it really seems intended for beginners or micro applications, but for those of us writing anything besides the most trivial, it’s merely “cute” and just adds inconsistency.