本文整理汇总了C#中System.Object.GetLowerBound方法的典型用法代码示例。如果您正苦于以下问题:C# Object.GetLowerBound方法的具体用法?C# Object.GetLowerBound怎么用?C# Object.GetLowerBound使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Object
的用法示例。
在下文中一共展示了Object.GetLowerBound方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AssertValid
GetRowCount
(
Object [,] aoColumnValues
)
{
Debug.Assert(aoColumnValues != null);
AssertValid();
return ( aoColumnValues.GetUpperBound(0) -
aoColumnValues.GetLowerBound(0) + 1);
}
示例2:
SetRangeValues
(
Range upperLeftCornerMarker,
Object[,] values
)
{
Debug.Assert(upperLeftCornerMarker != null);
Debug.Assert(values != null);
Debug.Assert(upperLeftCornerMarker.Parent is Worksheet);
Worksheet oWorksheet = (Worksheet)upperLeftCornerMarker.Parent;
Int32 iRow = upperLeftCornerMarker.Row;
Int32 iColumn = upperLeftCornerMarker.Column;
Range oRangeToSet = oWorksheet.get_Range(
oWorksheet.Cells[iRow, iColumn],
oWorksheet.Cells[
iRow + values.GetUpperBound(0) - values.GetLowerBound(0),
iColumn + values.GetUpperBound(1) - values.GetLowerBound(1)
]
);
oRangeToSet.set_Value(Missing.Value, values);
}
示例3: LoadRows
///<summary>
///Creates a XArrayHelper and copies the values from an object array.
///</summary>
///<param name="array">The source array to be copied.</param>
public void LoadRows(Object[,] array)
{
this.RedimXArray(new int[] { array.GetUpperBound(0), array.GetUpperBound(1) }, new int[] { array.GetLowerBound(0), array.GetLowerBound(1) });
for (int row = array.GetLowerBound(0); row <= array.GetUpperBound(0); row++)
{
for (int col = array.GetLowerBound(1); col <= array.GetUpperBound(1); col++)
{
this.SetValue(array[row, col], row, col);
}
}
}