|
-
Apr 1st, 2008, 06:07 AM
#1
Thread Starter
Junior Member
passing ParamArray to another ParamArray
I am using the VBScript control, I have to pass multiple uncertain parameters to the VBScript control.
'my publich business method which is called by many business components:
Public Sub RunTheScript(ByVal s As String, ParamArray items())
'some biz routines here to manipulate items before passing to the script control
ScriptControl.Run(s, items)
End Sub
'the fixed Run method of VBScript control
Private Sub Run(ByVal ProcedureName As String, ParamArray items())
End Sub
'a biz caller
RunTheScript "foo",1,2,3,"a","b","c"
as you can see, I cannot change the behavior of the VBScript control, the items of RunTheScript pass to the ScriptControl.Run, will turn to be an array of array, which is:
items(0)(0) = 1
items(0)(1) = 2
items(0)(2) = 3
items(0)(3) = "a"
items(0)(4) = "b'
items(0)(5) = "c"
that is NOT what I want, I want is the normal result as we all expected:
items(0) = 1
items(1) = 2
items(2) = 3
items(3) = "a"
items(4) = "b'
items(5) = "c"
Anyone could solve the problem?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|