
- C# Basic Tutorial
- C# - Home
- C# - Overview
- C# - Environment
- C# - Program Structure
- C# - Basic Syntax
- C# - Data Types
- C# - Type Conversion
- C# - Variables
- C# - Constants
- C# - Operators
- C# - Decision Making
- C# - Loops
- C# - Encapsulation
- C# - Methods
- C# - Nullables
- C# - Arrays
- C# - Strings
- C# - Structure
- C# - Enums
- C# - Classes
- C# - Inheritance
- C# - Polymorphism
- C# - Operator Overloading
- C# - Interfaces
- C# - Namespaces
- C# - Preprocessor Directives
- C# - Regular Expressions
- C# - Exception Handling
- C# - File I/O
- C# Advanced Tutorial
- C# - Attributes
- C# - Reflection
- C# - Properties
- C# - Indexers
- C# - Delegates
- C# - Events
- C# - Collections
- C# - Generics
- C# - Anonymous Methods
- C# - Unsafe Codes
- C# - Multithreading
- C# Useful Resources
- C# - Questions and Answers
- C# - Quick Guide
- C# - Useful Resources
- C# - Discussion
Difference between SortedList and SortedDictionary in C#
Both SortedList and SortedDictionary in C# are the types of data structures used for data storage, now on the basis of characteristics and nature we can distinguish between both of them.
Following are the important differences between SortedList and SortedDictionary.
Sr. No. | Key | SortedList | SortedDictionary |
---|---|---|---|
1 | Memory organization | SortedList requires low memory for storage hence the memory status in its case is overhead. | On other hand SortedDictionary requires more memory for storage so memory status in its case is not bottlenecked. |
2 | Designed | SortedList is internally implemented as in sortedList the elements are stored in a continuous block in memory. | On other hand in SortedDictionary the elements are stored in separate object that can spread all over the heap. |
3 | Fragmentation | SortedList requires low memory for storage hence memory fragmentation is high. | On other hand due to more memory consumption fragmentation in case of SortedDictionary is low. |
4 | Access | In SortedList element can be accessed using the index. User can pass the desired known index and could get the value of element stored at that index in the list. | On the other hand user can access elements using index or key. In this case key access is sufficient there is no need of accessing elements using index. |
5 | Sorting | In SortedList, as name suggest the elements get stored in sorted form. | However on other hand in SortedDictionary data get stored in un-sorted form. |
- Related Articles
- Get an enumerator that iterates through the SortedDictionary in C#
- SortedList with Examples in C#?
- Check if SortedDictionary contains the specified key or not in C#
- Capacity of a SortedList in C#
- Search in a SortedList object in C#
- Difference between Structures in C and C++
- Difference between C and C++.
- Difference Between C# and C++
- What is the SortedList class in C#?
- How to create a SortedList in C#?
- Difference between strncmp() and strcmp() in C/C++
- Difference between %p and %x in C/C++
- Difference between float and double in C/C++
- Difference between C# and Visual C#
- Remove all elements from a SortedList in C#

Advertisements