getting array index count

I need to get the amount of indices in the aray

suppose the number of files is 200

Dim source() As String = openfile.FileNames
Dim len As String = source.Length
len = len.Length

' length will = 3
any easier way of getting that result?

Comments

  • The Length method provided on an array should work fine by itself. The following works by itself:

    dim len as integer = source.Length

    The Length property is not provided on the ArrayList, you will have to use the Count method instead.
    -Saumil.


    : I need to get the amount of indices in the aray
    :
    : suppose the number of files is 200
    :
    : Dim source() As String = openfile.FileNames
    : Dim len As String = source.Length
    : len = len.Length
    :
    : ' length will = 3
    : any easier way of getting that result?
    :
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion