Pass few elements to methods

I've few methods which acept collections of fixed size (e.g. 2, 3, 5). And I can't decide which way is better:

public void Foo(IEnumerable<Object> objects)
{
    if(objects.Count() != 3)
    {
        throw new Exception()
    }
    // actions
}

public void Foo(Object objectA, Object objectB, Object objectC)
{
    // actions
}

Is there any ultimate +\- of each option?

Jon Skeet
people
quotationmark

The second is much better in my view:

  • It's obvious from the signature that it's expecting 3 values
  • Failures are flagged at compile time instead of execution time

people

See more on this question at Stackoverflow