C#C
C#4y ago
Gladiator

Best way to Convert a single element to IEnumerable element

What is the best way (performance, memory, GC) to Convert a single element to IEnumerable<Element> elements?
T => IEnumerable<T>
return new []{element};
yield return element;
Was this page helpful?