PSDataTable.GetColumnAsString 方法 (DataRow, String, String)
會取得指定資料行DataRow物件中的字串值則為預設值。
命名空間: Microsoft.Office.Project.Server.Library
組件: Microsoft.Office.Project.Server.Library (在 Microsoft.Office.Project.Server.Library.dll 中)
語法
'宣告
Public Shared Function GetColumnAsString ( _
row As DataRow, _
colName As String, _
defaultValue As String _
) As String
'用途
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
)
參數
row
類型:System.Data.DataRow要搜尋指定資料行的資料列。
colName
類型:System.String資料行的名稱。
defaultValue
類型:System.String若要傳回,如果row或colNamenull 參考 (未執行任何動作 於 Visual Basic 中)預設值。
傳回值
類型:System.String
會傳回指定資料行的字串值。如果row或colNamenull 參考 (未執行任何動作 於 Visual Basic 中),會傳回String.Empty。