ex-09-17

来自「Programming Csharp Source Code(代码) Prog」· 代码 · 共 26 行

TXT
26
字号
// 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 + =
减小字号Ctrl + -
显示快捷键?