Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- 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 Hashtable class in C#?
Use the isFixedSize property of Hashtable class to get a value indicating whether the Hashtable has a fixed size.
The following is an example showing how to work with IsFixedSize property.
Example
using System;
using System.Collections;
namespace Demo {
class Program {
static void Main(string[] args) {
Hashtable ht = new Hashtable();
ht.Add("D01", "Finance");
ht.Add("D02", "HR");
ht.Add("D03", "Operations");
Console.WriteLine("IsFixedSize = " + ht.IsFixedSize);
Console.ReadKey();
}
}
}
Output
IsFixedSize = False
Above we have added Hashtable collection.
Hashtable ht = new Hashtable();
Then after adding elements, we have checked that whether it has a fixed size or not using the isFixedSize property.
ht.IsFixedSize
Advertisements