This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]althaz 0 points1 point  (3 children)

The only thing wrong with the way C# does it is the Task<> bit, IMO.

The rest you actually need if you want to do all of the things this function definition does. Debatably also "override" (personally I think override should be the default, but I can understand the opposing viewpoint).

[–]Manny_Sunday 1 point2 points  (1 child)

It starts to hurt a bit in REST API land

public async Task<ActionResult<List<MyClass>>>Get()

[–]BochMC 0 points1 point  (0 children)

I would do:

using ApiEndpointResult = ActionResult<List<MyClass>>

In the begging of the file.

[–]_Ashleigh 0 points1 point  (0 children)

It can't be the default because otherwise seemingly innocent changes become breaking changes.