You have a reference to Microsoft.VisualBasic
in your project which contains a Collection
class. This is what the compiler thinks you are trying to use and throws your error because it is not a generic type.
However what you are trying to use is the Generic Collection object Collection(Of T)
which is in the System.Collections.ObjectModel
namespace.
Easiest solution is to reference the fully qualified name so that the class is no longer ambiguous. Change:
Friend Property StatusesCollection() As New Collection(Of Status)
to
Friend Property StatusesCollection() As New System.Collections.ObjectModel.Collection(Of Status)
Or use a List(Of T)
instead:
Friend Property StatusesCollection() As New List(Of Status)
See this question for a comparison: What is the difference between List (of T) and Collection(of T)?