📄 default.aspx
字号:
<%@Page Language="VB"%>
<%@ Import Namespace="System.IO" %>
<%
dim authors as string()
redim authors(5)
authors(0) = "Richard"
authors(1) = "Alex"
authors(2) = "Dave"
authors(3) = "Karli"
authors(4) = "Brian"
dim e as IEnumerator
e = authors.GetEnumerator()
dim author as string
do While e.MoveNext() = true
Response.Write("<P>" + e.Current )
author = CType( e.Current, string )
Loop
for each author in authors
Response.Write("<P>" + author)
next
'VB
if Array.IndexOf(authors, "Richard") <> -1 then
Response.Write("<P>Richard is in the author list")
end if
'VB
dim index as integer
index = Array.IndexOf(authors,"Richard")
if index <> -1 then
Response.Write("<P>" & authors(index) & " is in the author list")
end if
'VB
dim list as IList
list = CType(authors, IList)
if list.Contains("Richard") then
index = list.IndexOf( "Richard")
Response.Write("<P>" & list(index) & " is in the author list")
end if
dim movieList as IList
movieList = new ArrayList()
movieList.Add("Pulp Fiction")
movieList.Add("Aliens")
'VB
dim variedItems as ArrayList = new ArrayList()
variedItems.Add("Pulp Fiction") ' add a string
variedItems.Add(1234) ' add an integer
variedItems.Add(new ArrayList()) ' add another array list
%>
</form>
<p style="color:red" id=status EnableViewState=False runat=server />
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -