![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 is the IsFixedSize property of ArrayList class in C#?
The IsFixedSize property of ArrayList class is used to get a value indicating whether the ArrayList has a fixed size.
The following is an example stating the usage of isFixedSize property.
Example
using System; using System.Collections; class Demo { public static void Main() { ArrayList arrList = new ArrayList(); Console.WriteLine("Adding some numbers:"); arrList.Add(45); arrList.Add(78); Console.WriteLine(arrList.Count); Console.WriteLine("myArrayList.IsFixedSize = " + arrList.IsFixedSize); } }
Output
Adding some numbers: 2 myArrayList.IsFixedSize = False
Above we have added an array list.
ArrayList arrList = new ArrayList();
Then we have checked whether it has a fixed size or not.
Console.WriteLine("myArrayList.IsFixedSize = " + arrList.IsFixedSize);
Advertisements