- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
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 is the IsFixedSize property of SortedList class in C#?
Use the IsFixedSize property in C# to get a value indicating whether the SortedList has a fixed size.
The following is an example showing SorteList with the usage of IsFixedSize property.
Example
using System; using System.Collections; namespace Demo { class Program { static void Main(string[] args) { SortedList s = new SortedList(); s.Add("S1", "Maths"); s.Add("S2", "Science"); s.Add("S3", "English"); s.Add("S4", "Economics"); Console.WriteLine("IsFixedSize = " + s.IsFixedSize); } } }
Output
IsFixedSize = False
We have added a SortedList first and then used the Add() method to set the elements with key and value pair.
SortedList s = new SortedList(); s.Add("S1", "Maths"); s.Add("S2", "Science"); s.Add("S3", "English"); s.Add("S4", "Economics");
Now we have used the IsFixedSize above to check whether the size of the SortedList is fixed or not.
- Related Articles
- What is the IsFixedSize property of Hashtable class in C#?
- What is the IsFixedSize property of ArrayList class in C#?
- What is the IsReadOnly property of SortedList class in C#?
- What is the Keys property of SortedList class in C#?
- What is the Item property of SortedList class in C#?
- What is the Capacity property of SortedList class in C#?
- What is the Count property of SortedList class in C#?
- What is the Values property of SortedList class in C#?
- What is the SortedList class in C#?
- What is the IsReadOnly property of Hashtable class in C#?
- What is the Item property of ArrayList class in C#?
- What is the IsReadOnly property of BitArray class in C#?
- What is the Keys property of Hashtable class in C#?
- What is the Item property of Hashtable class in C#?
- What is the IsReadOnly property of ArrayList class in C#?

Advertisements