PbArray<T>.Length Property
.NET Standard 2.x
Gets the total number of elements in all the dimensions of PbArray.
Namespace: PowerScript.Bridge
Assembly: PowerScript.Bridge.dll
Syntax
public int Length => this.InternalPbArray.Length;
Property Value
System.Int32
The total number of elements in all the dimensions of PbArray; 0
if there are no elements in the array.
Examples
The following code example demonstrates how to get the total number of elements in an array.
using System;
using PowerScript.Bridge;
namespace Appeon.ApiDoc.PbArrayExamples
{
public class LengthExample
{
public void Example()
{
// Creates a PbArray object and adds three elements
PbArray<int> pbArray = new PbArray<int>();
pbArray.Add(2);
pbArray.Add(4);
pbArray.Add(6);
Console.WriteLine($"Length: {pbArray.Length}");
/*This code produces the following output:
Length: 3
*/
}
}
}
Applies to
.NET Standard
2.x