I have created a custom attribute as follows :

<AttributeUsage(AttributeTargets.Class)> _
Public Class ParameterAttribute
    Inherits Attribute

    Private m_methodName As String()

    Public Sub New(ByVal methodNames As String())
        m_methodName = methodNames
    End Sub

End Class

But I get an error when trying to use it in VB.Net ie.
<ParameterAttribute(New String() {"test"})> _
Public Class SomeObject

End Class

How do I pass a string array to the attribute constructor ?

Any help would be much appreciated

Reply via email to