Converting BindingList(Of T) to Array
- by George
Public Class Orders
Inherits System.ComponentModel.BindingList(Of Order)
End Class
Public Sub DataBind(ByVal Orders() As Orders)
End Sub
Dim MyOrders() As Order = Orders.ToArray
SuperListBinder.DataBind(MyOrders) '<<Error occurs on this line
I don't understand this error. I think that I am passing the appropriate data type to a sub. I don't understand the meaning of "Cannot convert object of type x to an object of type x!
Note that, if relevant, my Solution File contains ,multiple projects and that they are all project references.
Error:
Error 1 Value of type '1-dimensional array of BESI.BusinessObjects.Order' cannot be converted to '1-dimensional array of BESI.BusinessObjects.Orders' because 'BESI.BusinessObjects.Order' is not derived from 'BESI.BusinessObjects.Orders'. C:\My\Code\BESI\BesiAdmin\Forms\Activity.vb 17 34 BesiAdmin