VB.Net v4.6 - VS2015
Take the following code:
I have a class (KeywordClass) with some properties, a module with a declaration of
Friend _ImportKeywords As New List(Of String)
and a Write only property on the class of:
Public WriteOnly Property ImportKeywords() As List(Of String)
Set(ByVal value As List(Of String))
_ImportKeywords = value
End Set
End Property
I am trying to pass a list to the property from outside of the class.
Dim Kwords As New List(Of String)
Kwords.add("testing")
Kwords.add("hello")
Kwords.add("goodbye")
Using MyClass As New KeywordClass
MyClass.ImportKeywords(Kwords)
End Using
but Im getting the error: Too many arguments to 'Public WriteOnly Property ImportKeywords As List(Of String)'
If someone can help me, I'd be very appreciative. Thanks for your time :)
What I have tried:
I've done a fair bit of searching and all the results that have been solutions seem to point to just passing the list - which is what I have done above. Nothing else seems to work and Im probably missing the obvious. :/