Monorepo/Modules.Language/DataRowEx.vb
Jonathan Jenne 77621193f2 Zooflow: WIP
2021-12-01 16:22:51 +01:00

13 lines
386 B
VB.net

Imports System.Runtime.CompilerServices
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