- Trending Categories
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 IsReadOnly property of ArrayList class in C#?
The IsReadOnly property of ArrayList class is useful to get a value indicating whether the ArrayList is read-only.
Firstly, we have the following ArrayList.
ArrayList arrList = new ArrayList();
Then we have checked using the IsReadOnly Property.
Console.WriteLine("myArrayList.IsReadOnly = " + arrList.IsReadOnly);
The following is an example showing how to work with IsReadOnly property in ArrayList class.
Example
using System; using System.Collections; class Demo { public static void Main() { ArrayList arrList = new ArrayList(); Console.WriteLine("myArrayList.IsReadOnly = " + arrList.IsReadOnly); } }
Output
myArrayList.IsReadOnly = False
Advertisements