Public MustInherit Class BusinessCore(Of T As BusinessCore(Of T))
Inherits MyCsla.BusinessBase(Of T)
Oh, and now that I've helped you, get off my lawn!! And stop playing that loud music!! And slow down when driving down my street, somebody's gonna get hurt! :)
Give a man a fish...
http://www.developerfusion.com/tools/convert/csharp-to-vb/
Joe
more trouble with this. I have created a base class named ListCore as follows:
Public MustInherit Class ListCore(Of T As BusinessBase(Of T))
Inherits Csla.BusinessBase(Of T)
And Inherited classes declare like so:
Public Class Preflist
Inherits ListCore(Of Preflist)
Public Class Blackboard
Inherits ListCore(Of Blackboard)
That's working ok. But now I want to create a variable on a form for editing (I will be editing either a Preflist or Blackboard above, but only properties in the base ListCore class. I declare the variable on the form this way
private fLst as ListCore
and I get the syntax error "too few type arguments to DV.Lib.ListCore(of T)". How do I declare this variable?
Dan is absolutely correct.
You need to create an interface for your child objects, and one list that contains either (or both) types of child object based on that interface.
The trick to making this work is to make your child object interface inherit from IEditableBusinessObject, because that's the constraint on the C type in BusinessListBase(Of T, C).
Copyright (c) Marimer LLC