Share via


PSDataTable.GetColumnAsInt32 Method (DataRow, String, Int32)

Gets the integer 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 GetColumnAsInt32 ( _
    row As DataRow, _
    colName As String, _
    defaultValue As Integer _
) As Integer
'Usage
Dim row As DataRow
Dim colName As String
Dim defaultValue As Integer
Dim returnValue As Integer

returnValue = PSDataTable.GetColumnAsInt32(row, _
    colName, defaultValue)
public static int GetColumnAsInt32(
    DataRow row,
    string colName,
    int defaultValue
)

Parameters

  • defaultValue
    Type: System.Int32
    The default value to return, if either row or colName are a null reference (Nothing in Visual Basic).

Return Value

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

See Also

Reference

PSDataTable Class

PSDataTable Members

GetColumnAsInt32 Overload

Microsoft.Office.Project.Server.Library Namespace