Comment

Comment by AndrewDucker

One of the things I wish C# did was allow for inline declaration of enumerations in method parameters.

Something like:

    void DoSomething(Thing thing, enum logging{WithLogging,NoLogging}){}
Because I'd frequently like to be able to make my parameters more explicit, but the overhead of creating a new enum type seems a tad heavyweight.

Edit: Raised it as an issue on GitHub with more details - https://github.com/dotnet/roslyn/issues/3497

parent AndrewDucker 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton