Defining an String Array via vb.net

Hi all,

I’m writing a function with parameters. In parameters includes an array but this array type should be string.
How can i define an string array?

I did like this => Function(ByVal P_Names() As Array) … this gives me an error.
The error is “Option Strict On disallows implicit conversions from ‘Array’ to ‘Array()’”
I’m going to use this array like this => P_Names(0)… etc.

Thanks

Hi @Kuki_Force

Please look at this

Cheers

You can use String.Join

String.Join(", ", P_Names)

Check out this thread

Regards
Gokul

hi, I defined an string array outside the invoke code and this array includes string datas and array name is myNames and also invoke arg name.
I’m reaching this datas like this ex : P_Names(0). This is function parameter of course.

When i use this function i’m going to use like this. => Let say function name is ‘callNames’
callNames(myNames(0))
and function do some jobs. This doesn’t important.

I hope i explained my self clearly.
Thanks.

@Gokul001

I want to use like this.
arr_PageNames() As Array Gives me an error.

normally without a function it works fine. when i converting to dynamic structure it gives me an error as i wrote at the beginning.