default.aspx.cs
来自「對c#初學者參考..為課題asp.net 2.0教材代碼」· CS 代码 · 共 25 行
CS
25 行
using System;
using System.Collections;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Person scott = new Person("Scott", "Hanselman");
Person bill = new Person("Bill", "Evjen");
Person srini = new Person("Srinivasa", "Sivakumar");
Hashtable peopleHashtable = new Hashtable();
peopleHashtable.Add("sh", scott);
peopleHashtable.Add("be", bill);
peopleHashtable.Add("ss", srini);
SortedList peopleSortedList = new SortedList(peopleHashtable);
foreach (Person p in peopleSortedList.Values)
{
Response.Write(p.FullName + "<BR/>");
}
Response.Write("Index of Srinivasa: " + peopleSortedList.IndexOfKey("ss"));
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?