다음을 통해 공유


PSDataTable.GetColumnAsString method (DataRow, String, String)

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

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

Parameters

  • defaultValue
    Type: System.String

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

Return value

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

See also

Reference

PSDataTable class

PSDataTable members

GetColumnAsString overload

Microsoft.Office.Project.Server.Library namespace