Remove from Hashtable
In this chapter you will learn:
Revove from Hashtable
The following code uses Remove
method to
remove key/value pairs from Hashtable
.
using System;/*from jav a 2 s .c o m*/
using System.Collections;
class MainClass
{
static void Main(string[] args)
{
Hashtable a = new Hashtable(10);
a.Add(100, "A");
a.Add(200, "C");
a.Remove(100);
a.Remove(200);
}
}
Next chapter...
What you will learn in the next chapter:
Home » C# Tutorial » Collections