If i have an array of a certain type, is there away of initializing
with without knowing it's type? for example (forgive me if some of
this is syntactically incorrect)
if i have a procedure like this
private sub addElements( target() as Object , elemsToAdd () as object )
begin
if ( arr is Nothing ) then
{initialize with correct type}
end if
Array.resize( target, elemsToAdd.Length)
....
'add elements to target() array
end sub
And from my main routine i'd call it like this:
private dim arr1() as Type1 = nothing;
private dim arr2() as Type2 = nothing;
private dim arrElems1() as Type1 =....
private dim arrElems2() as Type2 =....
addElements( arr1, arrElems1)
addElements( arr2, arrElems2)
As you can see in the scenario above, if both arr1 and arr2 are
Nothing, id like to initialize them in the sub "addElements". How can
i do that?