Passing a constant array to a function in VB.NET -


I know that you can easily pass an array on a function, such as the code below

  A few private functions (Byval PassedArray () as string) I was assigned as integer = 0. Calculation - 1 Debugpublished (PassedArray (i)) Next Closing Sub-Sub Sub Test () Dim MyArray as String () = {Some "," Array "," Member "} Some Functions (MyArrow) End Sub  

But is there a way to pass a continuous array for the function in VB.NET?>

For example, you can type:

  Function SomeFunction ($ array) {for ($ i = 0; $ i & lt; count ($ array); $ i ++) {ebb ($ array [$ i]);}} function test () {some functions (Array ("some", "array", "member")); // works for PHP}  
< P> Repeat this: Is there a way to pass a continuous array of functions in VB.NET? Is there any advantage in doing this? I think some bytes of memory can be saved.

PS:

  Some functions ({"some", "array", "member"}) 'it clearly gives a syntax error   

One more thing that I thought did not answer directly, but maybe poster - Ultimate Arre keywords intentions. If you control the function that you are calling, then it can make life a lot easier. Public Function MyFunction (By String (By Paramayer P as Bye) 'P' Here is a normal AR function 'This is a valid call MyFunction (New string () ("A", " B "," c "," d "}) 'then this is my function (" a "," b "," c "," d ")


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -