C#

#region "Extensions"
[Extension()]
public T GetValue<T>(DataRow row, string key)
{
    return (T)row(key);
}
#endregion

Vb.net

#Region "Extensions"
    <Extension()>
    Public Function GetValue(Of T)(row As DataRow, key As String) As T
        Return DirectCast(row(key), T)
    End Function
#End Region