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(ByV al row as Datarow)
Select Case row.GetType.Nam e
Case "MyTable1Ro w"
MySub(Ctype(row ,MyTable1Row))
Case "MyTable2Ro w"
MySub(Ctype(row ,MyTable2Row))
End Select
....
End Sub
I was hoping for something more like this
Public Sub DoSomething(ByV al row as DataRow)
MySub(Ctype(row ,row.GetType)
....
End Sub
Thanks,
Pat
--
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(ByV al row as Datarow)
Select Case row.GetType.Nam e
Case "MyTable1Ro w"
MySub(Ctype(row ,MyTable1Row))
Case "MyTable2Ro w"
MySub(Ctype(row ,MyTable2Row))
End Select
....
End Sub
I was hoping for something more like this
Public Sub DoSomething(ByV al row as DataRow)
MySub(Ctype(row ,row.GetType)
....
End Sub
Thanks,
Pat
--
Pat
Comment