dendrodocs / dotnet-shared-lib

Shared .NET library for DendroDocs.
MIT License
2 stars 2 forks source link

Expression body syntax or statement bodies? #11

Open YVbakker opened 1 month ago

YVbakker commented 1 month ago

In .editorconfig it's set to csharp_style_expression_bodied_methods = false:suggestion

However, in build/.editorconfig this is set to csharp_style_expression_bodied_methods = true

Which one is preferred and why? In what cases?

I ask because I can see most methods use a statement body while not always necessary, but for example in https://github.com/dendrodocs/dotnet-shared-lib/blob/main/src/DendroDocs.Shared/Descriptions/TypeDescription.cs expression bodies are used.

eNeRGy164 commented 1 month ago

The files in the build directory are provided by Nuke.

I'm not against using them, if code remains readable.