ilisticollection_simple.aspx
来自「Professional ASP.NET source code」· ASPX 代码 · 共 29 行
ASPX
29 行
<%@Page Language="C#"%>
<h3>IList & ICollection Simple Examples</h3>
<%
string[] authors = new string[6] {"Richard","Alex",
"Dave","Rob","Brian","Karli"};
int index;
index = Array.IndexOf( authors, "Richard");
if ( index != -1 )
{
Response.Write("<P>" + authors[index] + " is in the author list");
}
IList list = (IList) authors;
if ( list.Contains("Richard") == true )
{
index = list.IndexOf("Richard");
Response.Write("<P>" + list[index] + " is in the author list");
}
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?