📄 ex-09-17
字号:
// Example 09-17: The Item property as offset operators
namespace Programming_CSharp
{
using System;
using System.Collections;
// a simple class to store in the array
public class Tester
{
static void Main()
{
// Create and initialize a new Hashtable.
Hashtable hashTable = new Hashtable();
hashTable.Add("000440312", "Jesse Liberty");
hashTable.Add("000123933", "Stacey Liberty");
hashTable.Add("000145938", "John Galt");
hashTable.Add("000773394", "Ayn Rand");
// access a particular item
Console.WriteLine("myHastTable[\"000145938\"]: {0}",
hashTable["000145938"]);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -