![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What does the interface ICollection do in C#
The ICollection interface in C# defines the size, enumerators, and synchronization methods for all nongeneric collections. It is the base interface for classes in the System.Collections namespace.
The following are the properties of ICollection interface −
Sr.No. | Property Name & Description |
---|---|
1 | Count The number of elements in the ICollection |
2 | SyncRoot Gets an object that useful to synchronize access to the ICollection. |
The following are the methods of ICollection interface −
Sr.No. | Method Name & Description |
---|---|
1 | CopyTo(Array^,Int32) The method copies the elements of the ICollection to an Array. |
2 | GetEnumerator() The GetEnumerator() method returns an enumerator that iterates through a collection |
Advertisements