2021-11-19 14:23:17 +01:00

14 lines
423 B
VB.net

Imports System.Runtime.CompilerServices
Imports DigitalData.Modules.Language
Public Module DataRowEx
<Extension()>
Public Function ItemEx(Of T)(pRow As DataRow, pFieldName As String, Optional pDefaultValue As T = Nothing) As T
Try
Return Utils.NotNull(pRow.Item(pFieldName), pDefaultValue)
Catch ex As Exception
Return Nothing
End Try
End Function
End Module