paramarray

Is there any way to deal with ParamArray values as byRef so they can be updated?

Sounds simple enough, but its not working. In this example, I want to set the values of 3 fields to equal a 4th. I could do something like this.... Dim str1 As String = "1" Dim str2 As String = "2" Dim str3 As String = "3" Dim str4 As String = "4" str2 = str1 str3 = str1 str4 = str1 ... but that's kind of wordy (yeah, I know, vb is w...

Variable number of arguments in ParamArray ArgList()

If I want to pass a number of values for the ParamArray arglist via an array, how do I do it? From what I've read so far, on VBA, it appears that I need to explicitly list the values that I want to pass. But what if there are potentially different numbers of values to pass, so I do not know in advance how many I'll want to pass to the fu...

Delegates and ParamArray - Workaround Suggestions?

Some predefined methods contain a ParamArray in their signature. Delegates, however, cannot contain a ParamArray in their signature. Question: Assume you wish to create a delegation mechanism for a specific method which requires a ParamArray. How would you work around this constraint? EDIT: just to make clear, assume you cannot change ...

ParamArray Not Working With COM

I have a Class Library that is exposed to COM like this: <ComClass(SomeClass.ClassId, SomeClass.InterfaceId, SomeClass.EventsId)> Public Class SomeClass Public Const ClassId As String = "GUID1" Public Const InterfaceId As String = "GUID2" Public Const EventsId As String = "GUID3" Public Sub SomeMethod(ByVal ParamArray ...

How to implement a funtion that takes a param array (variable number of args) of generic args

I have seen a question here where they implemented a generic dispose method that takes any IDisposable object and calls dispose on it. I would like to make this such that it can take variable number of args. However, I do want to restrict the args to be IDisposable at compile time. (This is because some people in my organization will en...

Submit array param with jQuery ajax/load

public ActionResult DoSomething(string[] arr, bool someBool, int someInt) { } trying to call the above method from jQuery: var test = []; test.push('dog'); test.push('cat'); $container.load('MyController/DoSomething', { 'arr[]': test, 'someBool': true, 'someInt': 1 }, function(response, status, xhr) { ...