Spam,
Public Delegate Sub EventListener(ByVal Sender As Object, ByVal e As
DataEventArgs(Of TItem)) <-- TItem doesn't work.
Depending on where you are trying to define EventListener you may need to
make the Delegate itself generic:
Public Delegate Sub EventListener(Of TItem)(ByVal sender As Object,
ByVal e As DataEventArgs(Of TItem))
Although I normally use EventHandler(Of T) then pass DataEventArgs(Of TItem)
as T.
Public Event Something As EventHandler(Of DataEventArgs(Of Whatever))
--
Hope this helps
Jay B. Harlow
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"Spam Catcher" <sp**********@rogers.comwrote in message
news:Xn**********************************@127.0.0. 1...
How do I declare an object to accept a TItem?
Also where is the documentation on TItem/TData/etc?
Here's the object:
Public Class DataEventArgs(Of TData)
Inherits EventArgs
Private innerData As TData
Here's the delgate which I want to pass a TItem
Public Delegate Sub EventListener(ByVal Sender As Object, ByVal e As
DataEventArgs(Of TItem)) <-- TItem doesn't work.