my personal preferences are as follows:
interface:
void Build(Thing thing); void Build(IEnumerable<Thing> things);
implementation:
void Build(Thing thing) { Build(new [] { thing }); } void Build(IEnumerable<Thing> things) {
the reason I prefer to use this template is because it ensures that you stay DRY , giving you the flexibility of having multiple overloads, unlike the params
method where you will need to convert any non-zero array enumerable to an array.
source share