I have an interface like
Public Shared Function myfunction(Byval myvar as string,
Optional ByVal myarray As ArrayList = Nothing) As String
but I want to declare an optional arraylist with default values… how to do that?
You can’t.
Default parameter values must be compile-time constants; you cannot use an object instanec as a default value (except for strings).
Instead, you can check whether it’s
Nothinginside the function, and, if so, populate it with defaults.