Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
❔ Are there read only collections that don't box enumerators? - C#
C
C#
•
3y ago
•
10 replies
nathanAjacobs
❔ Are there read only collections that don't box enumerators?
ReadOnlyCollection<T>
ReadOnlyCollection<T>
boxes struct enumerators since it stores
IList<T>
IList<T>
internally
.
ImmutableList<T>
ImmutableList<T>
does not box enumerator
, but I actually want to publically expose a List as read only and privately be able to modify it
.
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Read-only question
C
C# / help
2y ago
Collections
C
C# / help
15mo ago
✅ read-only builder.Services
C
C# / help
2y ago