Language: Add FieldOrDefault method
This commit is contained in:
parent
ad5443adae
commit
fd0876a1cb
@ -19,6 +19,16 @@ Public Module DataTableEx
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
<Extension()>
|
||||||
|
Public Function FieldOrDefault(Of T)(pRow As DataRow, pFieldName As String, Optional pDefaultValue As T = Nothing) As T
|
||||||
|
Return ItemEx(pRow, pFieldName, pDefaultValue)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
<Extension()>
|
||||||
|
Public Function FieldOrDefault(Of T)(pRow As DataRow, pFieldIndex As Integer, Optional pDefaultValue As T = Nothing) As T
|
||||||
|
Return ItemEx(pRow, pFieldIndex, pDefaultValue)
|
||||||
|
End Function
|
||||||
|
|
||||||
<Extension()>
|
<Extension()>
|
||||||
Public Function First(pTable As DataTable) As DataRow
|
Public Function First(pTable As DataTable) As DataRow
|
||||||
Try
|
Try
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user