When calling the GetMethods function which lists the methods for a given type, we should keep in mind that this function does not return methods in a particular order.
More specifically, the methods are not necessarily in the same order it has been declared in the source code.
This discrepancy is due to some caching performed by the .NET Framework for better performance as explained in a post by Haibo Luo.
This article is aimed at outlining solutions to order the methods returned by GetMethods in the declaring order.
Any class or structure in .NET can define the equality and inequality operators.
Implementing such operators, however, can be error-prone. The operators therefore need to be validated by unit tests.
We will first discuss the challenges of writing such unit tests.
Software engineers often deal with rich concepts related their lines of business such as suppliers, orders, commodity, authorizations, etc. Since the business logic drives the value of the software, this logic needs to be made a first-class citizen in applications. More specifically, the business concepts need to be modelized within a business layer (or business entities or business objects; all the terms being interchangeable).