Is yield break equivalent to returning Enumerable.Empty from a method returning IEnumerable

If you intend to always return an empty enumerable then using the Enumerable.Empty<string>() syntax is more declarative IMHO.

The performance difference here is almost certainly not significant. I would focus on readability over performance here until a profiler showed you it was a problem.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)