D is a dictionary whose entry values are of Type T
What I'm attempting to do is have a delegate like "Serializer" below that I can invoke on an instance of T, such as "Entry.Value" below.
Please see the "return Entry..." line below for my wishful thinking.
Is this possible?
If so, is it a bad idea?
Public Delegate Function Serializer(Of T)() As Byte()
Function SerializeDictionary_String_Object(Of T)(ByRef D As Dictionary(Of String, T), ByVal ObjSerializer As Serializer(Of T)) As Byte()
for each Entry in D
return Entry.Value.ObjSerializer()
exit for
next
End Function