0

Is it possible to do something like this (don't know how to form correct syntax):

Public Property MyProperty as ParamArray Date
   Get
      ...
   End Get
   Set(ParamArray p as Date)
      ...
   End Set
End Property 

3 Answers 3

1

No; that is not possible.

Instead, you should make a readonly Collection(Of DateTime) property.

Sign up to request clarification or add additional context in comments.

Comments

1

No, this is not possible. You'll have to define the property as Date() and create the array explicitly in order to assign it, though you should consider using a more appropriate collection type or interface rather than a simple array.

Comments

0

I guess if it is not possible to make a property will just make 2 methods:

Private itsDateLst As New List(Of Date)

Public Sub SetDateList(ByVal ParamArray p As Date) ...
Public Function GetDateList() As IList(Of Date) ...

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.