PbArray<T>.Add(T value) Method
.NET Standard 2.x
Appends the object to the end of PbArray<T>.
Namespace: PowerScript.Bridge
Assembly: PowerScript.Bridge.dll
Syntax
public void Add(T value);
Parameters
value
T
The object to be added to the end of PbArray<T>.
Examples
The following code example demonstrates how to use the Add method to add the int-type data to the pbArray object.
using System;
using PowerScript.Bridge;
namespace Appeon.ApiDoc.PbArrayExamples
{
public class AddExample
{
public void Example()
{
// Creates a PbArray object which is the int type and has no fixed size
PbArray<int> pbArray = new PbArray<int>();
// Adds data to PbArray
pbArray.Add(1);
pbArray.Add(2);
pbArray.Add(3);
foreach (int item in pbArray)
{
Console.WriteLine(item);
}
/*This code produces the following output:
1
2
3
*/
}
}
}
Applies to
.NET Standard
2.x