PbArray<T>.PbArray<T>(T[,] data) Method
.NET Standard 2.x
Defines an implicit conversion which converts a two-dimensional object to a PbArray<T>
object.
Namespace: PowerScript.Bridge
Assembly: PowerScript.Bridge.dll
Syntax
public static implicit operator PbArray<T>(T[,] data);
Parameters
data
T[,]
The two-dimensional array to be converted.
Returns
Returns the PbArray<T>
object that is converted.
Examples
The following code example demonstrates how to implicitly convert a two-dimensional array to a PbArray array.
using System;
using PowerScript.Bridge;
namespace Appeon.ApiDoc.PbArrayExamples
{
public class ImplicitExample
{
public void Example1()
{
// Creates a string-type two-dimensional array
string[,] data = new string[2,2] { { "one", "two"}, { "three", "four" } };
PbArray<string> pbArray = data;
Console.WriteLine(pbArray[0, 0]);
Console.WriteLine(pbArray[0, 1]);
Console.WriteLine(pbArray[1, 0]);
Console.WriteLine(pbArray[1, 1]);
/*This code produces the following output:
one
two
three
four
*/
}
}
}
Applies to
.NET Standard
2.x