How much does Linq.Take take?

I wasn't 100% certain how much the "Take" would take from a list with less elements than the number you want to take. It probably says in the docs, but let me assure you that this test succeeds:

[Test]
public void TakeTakesAsMuchAsThereIs()
{
  string[] stuff = {"hi"};
  var l = stuff.Take(3).ToList();
  Assert.That(l, Has.Count(1));
}
Creative Commons License

Frank Quednau 2021