I have found these various “singleton” methods to be useful for passing a single value to an API that requires a collection of that value. Of course, this works best when the code processing the ...
Here's the simplest possible code for creating a custom collection class in the Microsoft .NET Framework that includes support for For…Each loops, an indexer method and initializing collections with { ...