G
Guest
A little embarrassing but,
Public Sub MySub(ByVal row as MyTable1Row)
....
End Sub
Public Sub MySub(ByVal row as MyTable2Row)
....
End Sub
How do I get the following to work without the Select...Case block and the
Ctypes?
Public Sub DoSomething(ByVal row as Datarow)
Select Case row.GetType.Name
Case "MyTable1Row"
MySub(Ctype(row,MyTable1Row))
Case "MyTable2Row"
MySub(Ctype(row,MyTable2Row))
End Select
....
End Sub
I was hoping for something more like this
Public Sub DoSomething(ByVal row as DataRow)
MySub(Ctype(row,row.GetType)
....
End Sub
Thanks,
Pat
Public Sub MySub(ByVal row as MyTable1Row)
....
End Sub
Public Sub MySub(ByVal row as MyTable2Row)
....
End Sub
How do I get the following to work without the Select...Case block and the
Ctypes?
Public Sub DoSomething(ByVal row as Datarow)
Select Case row.GetType.Name
Case "MyTable1Row"
MySub(Ctype(row,MyTable1Row))
Case "MyTable2Row"
MySub(Ctype(row,MyTable2Row))
End Select
....
End Sub
I was hoping for something more like this
Public Sub DoSomething(ByVal row as DataRow)
MySub(Ctype(row,row.GetType)
....
End Sub
Thanks,
Pat
