Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

How to add Multiple Values to Custom Property

$
0
0
I looking for a solution on how to create a custom property that contains multiple values like of the AccessibleRole property of a form.

Here's what I made but I'm using the string array and it's just not the way I want it to be:
    Dim arr() As String

    Public Property MultiValue() As Array
        Get
            Return arr
        End Get
        Set(ByVal value As Array)
            arr = value
        End Set
    End Property

    Private Sub Properties_MultipleValues_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ReDim arr(0 To 4)
        arr(0) = "First Value"
        arr(1) = "Second  Value"
        arr(2) = "Third Value"
        arr(3) = "Fourth Value"
        arr(4) = "Fifth"

    End Sub




Thanks
Kirabitoy

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>