开发者

Sharing Multi-dimensional Arrays across different forms in VB

I have a very simple 2D array, it holds a list of song titles, their genre, and their runtime.

frmMain loads the array from a text file and allows me to manipulate it and boil it down to a desired (implicitly sized) playlist. i want to THEN pass that playlist array to a second form, frmPlaylist

The problem i'm running into....When frmPLaylist calls the Property from frmMain I receive an error that VB cannot convert the string value to a two dimensional array.

Simplified...frmPlaylist is all locked and ready to receive a 2D array, but frmMain seems to only be sending a single string variable.

Here's the code i'm working with if it helps.

on frmMain

Public ReadOnly Property PlaylistOut() As String
        Get
            Return mstrTimedPlaylist(,)
        End Get
    End Property

on frmPLaylist

  开发者_Python百科mstrTimedPlaylist2 = frmMain.PlaylistOut()


Public ReadOnly Property PlaylistOut() As String(,)
    Get
        Return mstrTimedPlaylist
    End Get
End Property
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜