I have a method named IsDone. This method does some checks and returns true or false.
Is there any benefit in using a Property without a setter instead?
I have a method named IsDone. This method does some checks and returns true or false.
Is there any benefit in using a Property without a setter instead?
If you don't modify the internal state and the checks does not have a lot of overhead a property is more appropriate. This article from MSDN provides some good guidelines to choose method vs property https://msdn.microsoft.com/en-us/library/ms229054(v=vs.100).aspx