PbArray<T>.GetLowerBound(int dimension) Method
.NET Standard 2.x
Gets the index of the first element of the specified dimension in the PbArray.
Namespace: PowerScript.Bridge
Assembly: PowerScript.Bridge.dll
Syntax
public int GetLowerBound(int dimension);
Parameters
dimension
System.Int32
A zero-based dimension of the PbArray whose starting index needs to be determined.
Returns
System.Int32
The index of the first element of the specified dimension in the PbArray.
Examples
The following code example demonstrates how to use the the GetLowerBound and GetUpperBound methods to show the bound of a one-dimensional array.
using System;
using PowerScript.Bridge;
namespace Appeon.ApiDoc.PbArrayExamples
{
public class GetLowerBoundExample
{
public void Example()
{
// Creates a PbArray object and assigns values
PbArray<int> pbArray = new PbArray<int>(){ 2, 4, 6, 8, 10, 12, 14, 16, 18, 20 };
int lower = pbArray.GetLowerBound(0);
int upper = pbArray.GetUpperBound(0);
Console.WriteLine($"LowerBound={lower}, UpperBound={upper}");
/*This code produces the following output:
LowerBound=0, UpperBound=9
*/
}
}
}
Applies to
.NET Standard
2.x