Design Principles for Collection and Enumerator Interfaces
There are different design principles behind each type of interface:
A collection interface provides random access to a single item in the collection via the
Item
method, it lets clients discover how many items are in the collection via theCount
property, and often allows clients to add and remove items.An enumerator interface provides serial access to multiple items in a collection, it doesn't allow the client to discover how many items are in the collection (until the enumerator stops returning items), and it doesn't provide any way of adding or removing items.
Each type of interface plays a different role in providing access to the elements in a collection.
See also
Feedback
https://aka.ms/ContentUserFeedback.
În curând: Pe parcursul anului 2024, vom elimina treptat Probleme legate de GitHub ca mecanism de feedback pentru conținut și îl vom înlocui cu un nou sistem de feedback. Pentru mai multe informații, consultați:Trimiteți și vizualizați feedback pentru