A good guidance on .NET collection interface to use

published on 2023/01/25

Last time, we discussed the following guideline:

  • Use the most generic types possible for arguments,
  • Use the most specific types possible for return values.

Or, to be more precise:

  • Use the most generic types for arguments, while keeping the method’s signature honest,
  • Use the most specific types for return values, while keeping the method’s signature honest.

EnterpriseCraftmanship