default.aspx
来自「This is a book about vb.you could learn 」· ASPX 代码 · 共 43 行
ASPX
43 行
<%@Page Language="VB" %>
<script runat="server">
Class MyStringCollection
Inherits CollectionBase
Overrides Protected Sub OnInsert( index as Integer, _
item as Object )
if not (typeof item is string) then
throw new ArgumentException("Collection only supports strings")
end if
End Sub
End Class
</script>
<%
dim names as IList
names = new MyStringCollection
names.Add("Richard")
names.Add("Alex")
names.Add("Dave")
' Uncomment next line to cause an exception
'names.Add( 2002 )
dim name as string
for each name in names
Response.Write( name & "<BR />" )
next
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?