ch1_10.cs

来自「《c#技术内幕代码》」· CS 代码 · 共 27 行

CS
27
字号
using System;
using System.Collections;

class CH1_10 {

   public static void Main() 
   {
	Hashtable ht = new Hashtable(10);
	
	// Add strings to the hashtable associated with a
	// key value (integer).
	
	ht.Add( 100, "Science");
	ht.Add( 200, "Math");
	ht.Add( 300, "English");
	ht.Add( 400, "History");
	ht.Add( 500, "Gym");
	
	foreach ( DictionaryEntry de in ht )
	{
		Console.WriteLine( "Entry Key {0} Value {1}", de.Key, de.Value );
	}
	
   }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?