In VB6, it was easy to pass a array of a certain type (ok, technically it was a array of variants) into a function as follows:

Code:
x = Foo(Array(2,3,5,7)) 'Array of integers
I know that in VB.NET, I can accomplish the same thing via code like this:

Code:
Dim bar(4) as Integer

bar(0) = 2
bar(1) = 3
bar(2) = 5
bar(3) = 7

x = Foo(bar)
However, this is a lot of extra code to express the same thing. Is there a way in VB.NET to inline the array definition in a single line (similar to what the VB6 code does)?

Many thanks!

- Kevin