vbs的sort排序
发布时间:2016-12-28 来源:查字典编辑
摘要:FunctionfSortArray(aSortThisArray)DimoArrayList,iElementSetoArrayList=...
FunctionfSortArray(aSortThisArray)
DimoArrayList,iElement
SetoArrayList=CreateObject("System.Collections.ArrayList")
ForiElement=0ToUBound(aSortThisArray)
oArrayList.AddaSortThisArray(iElement)
Next
oArrayList.Sort
setfSortArray=oArrayList
EndFunction
myarray=Array(50,20,30)
MsgBoxmyarray(0)
MsgBoxfSortArray(myarray)(0)
'CreateObject("System.Collections.ArrayList")调用了mscoree.dll,是.NETFramework相关组件。