vbs的sort排序
时间:2020-11-05 17:33:47|栏目:VBS|点击: 次
Function fSortArray(aSortThisArray)
Dim oArrayList, iElement
Set oArrayList = CreateObject( "System.Collections.ArrayList" )
For iElement = 0 To UBound(aSortThisArray)
oArrayList.Add aSortThisArray(iElement)
Next
oArrayList.Sort
set fSortArray = oArrayList
End Function
myarray=Array(50,20,30)
MsgBox myarray(0)
MsgBox fSortArray(myarray)(0)
'CreateObject( "System.Collections.ArrayList" )调用了mscoree.dll,是.NET Framework相关组件。
Dim oArrayList, iElement
Set oArrayList = CreateObject( "System.Collections.ArrayList" )
For iElement = 0 To UBound(aSortThisArray)
oArrayList.Add aSortThisArray(iElement)
Next
oArrayList.Sort
set fSortArray = oArrayList
End Function
myarray=Array(50,20,30)
MsgBox myarray(0)
MsgBox fSortArray(myarray)(0)
'CreateObject( "System.Collections.ArrayList" )调用了mscoree.dll,是.NET Framework相关组件。
上一篇:VBS中通过调用CAPICOM对象实现SHA1&MD5加密
栏 目:VBS
下一篇:IE浏览器增加“复制图像地址”的右键菜单的vbs代码
本文标题:vbs的sort排序
本文地址:http://www.codeinn.net/misctech/19243.html