standards-c-sharp

Choosing the correct type for an enumerable

Supported types

Only the following enumerable types may be returned from public methods:

Which one should I use?

The following chart shows how to decide which general collection type to use for your implementation, internal exposure and public API exposure:

Collection type flowchart

Thread safety

The concrete types above can be have multiple readers, but are not thread-safe for mutations. Some have thread-safe analogs.