Share via


PSDataTable.GetColumnAsBoolean method (DataRow, String, Boolean)

Gets the Boolean value of the specified column in a DataRow object, or a default value.

Namespace:  Microsoft.Office.Project.Server.Library
Assembly:  Microsoft.Office.Project.Server.Library (in Microsoft.Office.Project.Server.Library.dll)

Syntax

'Declaration
Public Shared Function GetColumnAsBoolean ( _
    row As DataRow, _
    colName As String, _
    defaultValue As Boolean _
) As Boolean
'Usage
Dim row As DataRow
Dim colName As String
Dim defaultValue As Boolean
Dim returnValue As Boolean

returnValue = PSDataTable.GetColumnAsBoolean(row, _
    colName, defaultValue)
public static bool GetColumnAsBoolean(
    DataRow row,
    string colName,
    bool defaultValue
)

Parameters

  • defaultValue
    Type: System.Boolean

    The default value to return, if either row or colName are a null reference (Nothing in Visual Basic).

Return value

Type: System.Boolean
Returns the Boolean value of the specified column. If either row or colName are a null reference (Nothing in Visual Basic), it returns false.

See also

Reference

PSDataTable class

PSDataTable members

GetColumnAsBoolean overload

Microsoft.Office.Project.Server.Library namespace