⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 default.aspx

📁 This is a book about vb.you could learn this from this book
💻 ASPX
字号:
<%@Page Language="VB"%>
<%@ Import Namespace="System.IO" %>


<script runat=server>

	
Sub DoSomethingWithAList( list as ArrayList )

	SyncLock list

		list.Add("abc")

	End SyncLock

End Sub

</script>

<%
'VB


dim Animals as ArrayList = new ArrayList()
dim ArrayOfAnimals() as string

Animals.Add( "Cat" )
Animals.Add( "Dog" )

dim a as Array
dim s as string

ArrayOfAnimals = Array.CreateInstance( GetType(String), 2 )

Animals.CopyTo( ArrayOfAnimals, 0 )
dim Animal as String

For Each Animal in ArrayOfAnimals 
	Response.Write("<P>" + Animal )
Next

dim NotThreadSafeArrayList as ArrayList

NotThreadSafeArrayList = new ArrayList()
NotThreadSafeArrayList.Add("Hello")

dim ThreadSafeArrayList as ArrayList

ThreadSafeArrayList = ArrayList.Synchronized( NotThreadSafeArrayList )

if ThreadSafeArrayList.IsSynchronized = true then
	Response.Write("<P>It's synchronized")
end if
%>



1
<p style="color:red" id=status EnableViewState=False runat=server />

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -