New answers tagged

1

Keep in mind that properties are "actual getter and setter methods." A property is nothing more or less than one or two methods, along with a piece of metadata saying "this is a property." The syntax for calling a property method is different from the syntax for calling an ordinary method, but aside from that, a property method works exactly the same way as ...


7

C# properties are made of methods. Thus, by using methods instead of properties, you do not get any runtime advantages. Instead it will be all about developer productivity and readability of your code. Readability is for yourself too. In a few months when you forgot the details of your code and you need to modify it to fix a bug or add a new feature. Even ...


2

As you used the term endpoint in the subject of the question, I assume you are using (web) URI to define the location and identify of your (REST) resource. Merging two methods into one based on the query parameters should not be the reason for your decisions. You should be defining your API based on your resources. The methods that implement functionality ...


Top 50 recent answers are included