Add Overload for ItemEx
This commit is contained in:
parent
65ee19790b
commit
aaa1d04c87
@ -10,6 +10,15 @@ Public Module DataTableEx
|
||||
End Try
|
||||
End Function
|
||||
|
||||
<Extension()>
|
||||
Public Function ItemEx(Of T)(pRow As DataRow, pFieldIndex As Integer, Optional pDefaultValue As T = Nothing) As T
|
||||
Try
|
||||
Return Utils.NotNull(pRow.Item(pFieldIndex), pDefaultValue)
|
||||
Catch ex As Exception
|
||||
Return Nothing
|
||||
End Try
|
||||
End Function
|
||||
|
||||
<Extension()>
|
||||
Public Function First(pTable As DataTable) As DataRow
|
||||
Try
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user