Hashtable Class की IsFixedSize Property का उपयोग यह Value Get करने के लिए करें जो Indicate करती है कि Hashtable का Fixed Size है या नहीं।
निम्न Example दर्शाता है कि 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
ऊपर हमने Hashtable Collection Add किया है।
Hashtable ht = new Hashtable();
फिर Elements Add करने के बाद, हमने IsFixedSize Property का उपयोग करके Check किया कि क्या इसका Fixed Size है या नहीं।
ht.IsFixedSize