SlideShare a Scribd company logo
1 of 11
 Introduction
 Types
 It makes programs more compact and easier.
 Contains Methods, Indexes, Events and
Properties.
 .NET class library defines 2 different interfaces-
1. Generic Interfaces
2. Non-Generic Interfaces
 IEnumerable
 IEnumerable<T>
 IEnumerator
 Ienumerator<T>
 ICollection
 Icollection<T>
 Idictonary
 Ilist
 Ilist<T>
 Icompare
 IEqualityComparer<T>
IEnumerable
 Supports simple iteration over non-generic collection
 Method –
GetEnumerator( )
IEnumerable<T>
 supports iteration over generic collection
 T- The type of objects to enumerate.
 Method –
GetEnumerator( )
IEnumerator
 Supports iteration over non-generic collection.
 Properties -
Current
 Methods -
MoveNext( )
Reset ( )
IEnumerator<T>
 Supports iteration over generic collection.
 T- type of object to enumerate
 Properties -
Current
 Methods -
MoveNext( )
Reset ( )
Dispose( )
ICollection
 Properties -
Count
IsSynchronized
IsReadonly
 Methods -
CopyTo ( )
GetEnumerator ( 0
ICollection<T>
 Defines methods to manipulate generic collections.
 T- type of elements in the collection
 Properties -
Count
IsReadonly
 Methods -
Add ( ) Clear ( )
Contains ( ) Remove ( )
IList
 Represents a non-generic collection of objects.
 Falls into categories -
1. Read-Only
2. Fixed Size
3.variable Size
 Properties -
Count
IsFixedSize
IsReadOnly
 Methods -
Add ( ) Clear ( )
Contains ( ) Remove ( )
CopyTO ( ) Insert ( )
IList<T> - Represents a generic collection of objects.
IDictonary
 Represents a non-generic collection of key/value pair
 Falls into categories -
1. Read-Only
2. Fixed Size
3.variable Size
 Properties –
Count
IsFixedSize
IsReadOnly
 Methods -
Add ( ) Clear ( )
Contains ( ) Remove ( )
CopyTo
IEqualityComparer
 Defines methods to support the comparison of objects for equality.
 Methods -
Equals ( )
GetHashCode ( )
IComparer
 Exposes a method that compares two objects.
 Methods -
Compare ( )
Thank you

More Related Content

What's hot

Coherence SIG: Advanced usage of indexes in coherence
Coherence SIG: Advanced usage of indexes in coherenceCoherence SIG: Advanced usage of indexes in coherence
Coherence SIG: Advanced usage of indexes in coherence
aragozin
 
Java Collections
Java CollectionsJava Collections
Java Collections
parag
 

What's hot (20)

Array 2
Array 2Array 2
Array 2
 
Collections and generics
Collections and genericsCollections and generics
Collections and generics
 
Coherence SIG: Advanced usage of indexes in coherence
Coherence SIG: Advanced usage of indexes in coherenceCoherence SIG: Advanced usage of indexes in coherence
Coherence SIG: Advanced usage of indexes in coherence
 
07 java collection
07 java collection07 java collection
07 java collection
 
Priority Queue
Priority QueuePriority Queue
Priority Queue
 
JAVA Collections frame work ppt
 JAVA Collections frame work ppt JAVA Collections frame work ppt
JAVA Collections frame work ppt
 
Java Collections
Java CollectionsJava Collections
Java Collections
 
Ch02
Ch02Ch02
Ch02
 
Java collection
Java collectionJava collection
Java collection
 
Arrays Data Structure
Arrays Data StructureArrays Data Structure
Arrays Data Structure
 
Collections Api - Java
Collections Api - JavaCollections Api - Java
Collections Api - Java
 
5 collection framework
5 collection framework5 collection framework
5 collection framework
 
Java10 Collections and Information
Java10 Collections and InformationJava10 Collections and Information
Java10 Collections and Information
 
java collections
java collectionsjava collections
java collections
 
Algorithms: I
Algorithms: IAlgorithms: I
Algorithms: I
 
collections
collectionscollections
collections
 
Chapter 12
Chapter 12Chapter 12
Chapter 12
 
Java Collections Tutorials
Java Collections TutorialsJava Collections Tutorials
Java Collections Tutorials
 
Java collections concept
Java collections conceptJava collections concept
Java collections concept
 
Java Collection framework
Java Collection frameworkJava Collection framework
Java Collection framework
 

Similar to C# Colletion interfaces

Language Integrated Query - LINQ
Language Integrated Query - LINQLanguage Integrated Query - LINQ
Language Integrated Query - LINQ
Doncho Minkov
 

Similar to C# Colletion interfaces (20)

Generics In and Out
Generics In and OutGenerics In and Out
Generics In and Out
 
collections
 collections collections
collections
 
Arrays C#
Arrays C#Arrays C#
Arrays C#
 
Collections
CollectionsCollections
Collections
 
python ppt.pptx
python ppt.pptxpython ppt.pptx
python ppt.pptx
 
Collections
CollectionsCollections
Collections
 
Python Training
Python TrainingPython Training
Python Training
 
Collections
CollectionsCollections
Collections
 
DSJ_Unit III_Collection framework.pdf
DSJ_Unit III_Collection framework.pdfDSJ_Unit III_Collection framework.pdf
DSJ_Unit III_Collection framework.pdf
 
C++ STL 概觀
C++ STL 概觀C++ STL 概觀
C++ STL 概觀
 
standard template library(STL) in C++
standard template library(STL) in C++standard template library(STL) in C++
standard template library(STL) in C++
 
Collection Framework in java
Collection Framework in javaCollection Framework in java
Collection Framework in java
 
.NET Fest 2018. Дмитрий Иванов. Иммутабельные структуры данных в .NET: зачем ...
.NET Fest 2018. Дмитрий Иванов. Иммутабельные структуры данных в .NET: зачем ....NET Fest 2018. Дмитрий Иванов. Иммутабельные структуры данных в .NET: зачем ...
.NET Fest 2018. Дмитрий Иванов. Иммутабельные структуры данных в .NET: зачем ...
 
Language Integrated Query - LINQ
Language Integrated Query - LINQLanguage Integrated Query - LINQ
Language Integrated Query - LINQ
 
JAVA PROGRAMMING - The Collections Framework
JAVA PROGRAMMING - The Collections Framework JAVA PROGRAMMING - The Collections Framework
JAVA PROGRAMMING - The Collections Framework
 
JavaCollections.ppt
JavaCollections.pptJavaCollections.ppt
JavaCollections.ppt
 
JavaCollections.ppt
JavaCollections.pptJavaCollections.ppt
JavaCollections.ppt
 
C# programming
C# programming C# programming
C# programming
 
Testing for share
Testing for share Testing for share
Testing for share
 
Iterarators and generators in python
Iterarators and generators in pythonIterarators and generators in python
Iterarators and generators in python
 

More from Prem Kumar Badri

More from Prem Kumar Badri (20)

Module 15 attributes
Module 15 attributesModule 15 attributes
Module 15 attributes
 
Module 14 properties and indexers
Module 14 properties and indexersModule 14 properties and indexers
Module 14 properties and indexers
 
Module 12 aggregation, namespaces, and advanced scope
Module 12 aggregation, namespaces, and advanced scopeModule 12 aggregation, namespaces, and advanced scope
Module 12 aggregation, namespaces, and advanced scope
 
Module 13 operators, delegates, and events
Module 13 operators, delegates, and eventsModule 13 operators, delegates, and events
Module 13 operators, delegates, and events
 
Module 11 : Inheritance
Module 11 : InheritanceModule 11 : Inheritance
Module 11 : Inheritance
 
Module 10 : creating and destroying objects
Module 10 : creating and destroying objectsModule 10 : creating and destroying objects
Module 10 : creating and destroying objects
 
Module 9 : using reference type variables
Module 9 : using reference type variablesModule 9 : using reference type variables
Module 9 : using reference type variables
 
Module 8 : Implementing collections and generics
Module 8 : Implementing collections and genericsModule 8 : Implementing collections and generics
Module 8 : Implementing collections and generics
 
Module 7 : Arrays
Module 7 : ArraysModule 7 : Arrays
Module 7 : Arrays
 
Module 6 : Essentials of Object Oriented Programming
Module 6 : Essentials of Object Oriented ProgrammingModule 6 : Essentials of Object Oriented Programming
Module 6 : Essentials of Object Oriented Programming
 
Module 5 : Statements & Exceptions
Module 5 : Statements & ExceptionsModule 5 : Statements & Exceptions
Module 5 : Statements & Exceptions
 
Module 4 : methods & parameters
Module 4 : methods & parametersModule 4 : methods & parameters
Module 4 : methods & parameters
 
Module 3 : using value type variables
Module 3 : using value type variablesModule 3 : using value type variables
Module 3 : using value type variables
 
Module 2: Overview of c#
Module 2:  Overview of c#Module 2:  Overview of c#
Module 2: Overview of c#
 
Module 1 : Overview of the Microsoft .NET Platform
Module 1 : Overview of the Microsoft .NET PlatformModule 1 : Overview of the Microsoft .NET Platform
Module 1 : Overview of the Microsoft .NET Platform
 
C# Non generics collection
C# Non generics collectionC# Non generics collection
C# Non generics collection
 
C# Multi threading
C# Multi threadingC# Multi threading
C# Multi threading
 
C# Method overloading
C# Method overloadingC# Method overloading
C# Method overloading
 
C# Inheritance
C# InheritanceC# Inheritance
C# Inheritance
 
C# Generic collections
C# Generic collectionsC# Generic collections
C# Generic collections
 

Recently uploaded

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
PECB
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Recently uploaded (20)

Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 

C# Colletion interfaces

  • 1.
  • 3.  It makes programs more compact and easier.  Contains Methods, Indexes, Events and Properties.  .NET class library defines 2 different interfaces- 1. Generic Interfaces 2. Non-Generic Interfaces
  • 4.  IEnumerable  IEnumerable<T>  IEnumerator  Ienumerator<T>  ICollection  Icollection<T>  Idictonary  Ilist  Ilist<T>  Icompare  IEqualityComparer<T>
  • 5. IEnumerable  Supports simple iteration over non-generic collection  Method – GetEnumerator( ) IEnumerable<T>  supports iteration over generic collection  T- The type of objects to enumerate.  Method – GetEnumerator( )
  • 6. IEnumerator  Supports iteration over non-generic collection.  Properties - Current  Methods - MoveNext( ) Reset ( ) IEnumerator<T>  Supports iteration over generic collection.  T- type of object to enumerate  Properties - Current  Methods - MoveNext( ) Reset ( ) Dispose( )
  • 7. ICollection  Properties - Count IsSynchronized IsReadonly  Methods - CopyTo ( ) GetEnumerator ( 0 ICollection<T>  Defines methods to manipulate generic collections.  T- type of elements in the collection  Properties - Count IsReadonly  Methods - Add ( ) Clear ( ) Contains ( ) Remove ( )
  • 8. IList  Represents a non-generic collection of objects.  Falls into categories - 1. Read-Only 2. Fixed Size 3.variable Size  Properties - Count IsFixedSize IsReadOnly  Methods - Add ( ) Clear ( ) Contains ( ) Remove ( ) CopyTO ( ) Insert ( ) IList<T> - Represents a generic collection of objects.
  • 9. IDictonary  Represents a non-generic collection of key/value pair  Falls into categories - 1. Read-Only 2. Fixed Size 3.variable Size  Properties – Count IsFixedSize IsReadOnly  Methods - Add ( ) Clear ( ) Contains ( ) Remove ( ) CopyTo
  • 10. IEqualityComparer  Defines methods to support the comparison of objects for equality.  Methods - Equals ( ) GetHashCode ( ) IComparer  Exposes a method that compares two objects.  Methods - Compare ( )