Click here to Skip to main content
15,916,030 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralParsing arrays into functions as input. Pin
Alsvha15-Dec-04 22:47
Alsvha15-Dec-04 22:47 
Hiya.

Got an easy question here I think Smile | :)

Is it possible to pass an Array into a function withouth having to "dim" the array before hand.

For instance something like this:


Public Function Name(byval inputArray as string())
//some code
End Function

Now if I were to call that function I'd dim the array and assign the values:

dim objArray as String() = {"value", "value" ... "value"}

and then call the function:

Name(objArray)

However - what I'd really like to call the function similar as this:

Name( {"value", "value", ... , "value" } )

That is calling the function withouth having to dim the array.

Is there anyway something similar is possible?
Yes - I know it is a few lines of codes, but I'd still like to know.´

With regards
Alsvha

---------------------------
127.0.0.1 - Sweet 127.0.0.1
GeneralRe: Parsing arrays into functions as input. Pin
Dave Kreskowiak16-Dec-04 3:35
mveDave Kreskowiak16-Dec-04 3:35 
GeneralRe: Parsing arrays into functions as input. Pin
The Man from U.N.C.L.E.16-Dec-04 7:09
The Man from U.N.C.L.E.16-Dec-04 7:09 
GeneralAsynchronous web service calls with timeouts Pin
Dobbin.NET15-Dec-04 21:04
Dobbin.NET15-Dec-04 21:04 
GeneralRe: Asynchronous web service calls with timeouts Pin
The Man from U.N.C.L.E.16-Dec-04 7:13
The Man from U.N.C.L.E.16-Dec-04 7:13 
GeneralRe: Asynchronous web service calls with timeouts Pin
Dobbin.NET16-Dec-04 20:23
Dobbin.NET16-Dec-04 20:23 
Generalxml file Pin
Makniteasy15-Dec-04 20:11
Makniteasy15-Dec-04 20:11 
GeneralRe: xml file Pin
Tom John15-Dec-04 22:17
Tom John15-Dec-04 22:17 
GeneralInternet Connection Wizard through VB.NET Pin
Member 142664115-Dec-04 19:48
Member 142664115-Dec-04 19:48 
GeneralNeed sample code for developing ftp client using Infragistics controls Pin
Member 159330515-Dec-04 19:02
Member 159330515-Dec-04 19:02 
GeneralRe: Need sample code for developing ftp client using Infragistics controls Pin
Dave Kreskowiak16-Dec-04 3:20
mveDave Kreskowiak16-Dec-04 3:20 
GeneralAbout Windows media player Pin
santosh jaiswal 200415-Dec-04 18:16
santosh jaiswal 200415-Dec-04 18:16 
GeneralRe: About Windows media player Pin
Dave Kreskowiak16-Dec-04 3:14
mveDave Kreskowiak16-Dec-04 3:14 
GeneralApplication Crash at Err Raise when Type Mismatch occured Pin
shinay15-Dec-04 12:33
shinay15-Dec-04 12:33 
GeneralRe: Application Crash at Err Raise when Type Mismatch occured Pin
Tom John16-Dec-04 1:51
Tom John16-Dec-04 1:51 
GeneralRe: Application Crash at Err Raise when Type Mismatch occured Pin
Dave Kreskowiak16-Dec-04 3:00
mveDave Kreskowiak16-Dec-04 3:00 
GeneralPopupMenu BMPs... Pin
TAlvord15-Dec-04 10:47
TAlvord15-Dec-04 10:47 
GeneralRe: PopupMenu BMPs... Pin
Tom John15-Dec-04 22:40
Tom John15-Dec-04 22:40 
GeneralSwitching beteween forms in vb.net Pin
Ryan Coleman15-Dec-04 10:34
Ryan Coleman15-Dec-04 10:34 
GeneralRe: Switching beteween forms in vb.net Pin
Mekong River15-Dec-04 11:10
Mekong River15-Dec-04 11:10 
GeneralRe: Switching beteween forms in vb.net Pin
Zenly15-Dec-04 11:24
Zenly15-Dec-04 11:24 
GeneralRe: Switching beteween forms in vb.net Pin
Ryan Coleman15-Dec-04 13:23
Ryan Coleman15-Dec-04 13:23 
GeneralTest a connection to SQL Server Pin
marclenoir200515-Dec-04 10:18
marclenoir200515-Dec-04 10:18 
GeneralRe: Test a connection to SQL Server Pin
jonathan1517-Dec-04 2:56
jonathan1517-Dec-04 2:56 
GeneralInternal Domain Email Issues Pin
CitizenSoldier15-Dec-04 9:35
CitizenSoldier15-Dec-04 9:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.