Forums - C# Corner

Forum guidelines
Aniket Samanta

Aniket Samanta

  • 1.3k
  • 55
  • 1.4k

Insert Specific Datatype value in HashTable

Jan 7 2014 8:09 AM
I have a hashtable
Hashtable _hashTable = new Hashtable().
 
In this hashtable i want add only bool value .
 
_hashTable .Add(1, "false");
_hashTable .Add(2, "false");
_hashTable .Add(a, "true");
bcoz i need to assign this value in the below variable. 
bool _isindian = _hashTable[key].
is it possible to assign those _hashTable value in the _isindian variable ? 
Please advice. 


Answers (1)

File APIs for .NET – 25% off Aspose.Total
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more! Use coupon code HOL2016PSB