PSDataTable.GetColumnAsInt32 方法 (DataRow, String)
DataRow物件中取得指定資料行的整數值。
命名空間: Microsoft.Office.Project.Server.Library
組件: Microsoft.Office.Project.Server.Library (在 Microsoft.Office.Project.Server.Library.dll 中)
語法
'宣告
Public Shared Function GetColumnAsInt32 ( _
row As DataRow, _
colName As String _
) As Integer
'用途
Dim row As DataRow
Dim colName As String
Dim returnValue As Integer
returnValue = PSDataTable.GetColumnAsInt32(row, _
colName)
public static int GetColumnAsInt32(
DataRow row,
string colName
)
參數
row
類型:System.Data.DataRow要搜尋指定資料行的資料列。
colName
類型:System.String資料行的名稱。
傳回值
類型:System.Int32
會傳回指定資料行的整數值。如果row或colNamenull 參考 (未執行任何動作 於 Visual Basic 中),它會傳回0。
備註
適用於內部, GetColumnAsInt32(row, colName)呼叫GetColumnAsInt32(row, colName, 0)。