*TOOLS/DOTNETCONVERT: .NET Conversion Utilities
Description
Convert a PxPlus array to a .NET array, or a .NET array to a PxPlus array.
(The DotNetConvert utility was added in PxPlus 2026.)
Format 1
Convert a PxPlus Array to a .NET Array
CALL "*tools/dotnetconvert;toarray", pxpArray${ALL}, dotNetArray
Where: | ||
pxpArray${ALL} | PxPlus array of numbers or strings to convert. | |
dotNetArray | Numeric variable to hold handle to new .NET array object. | |
Example:
Convert a PxPlus array to a .NET array and use it to set a textbox:
def object textbox,@(10,10,50,50),"[.net]System.Windows.Forms,System.Windows.Forms.TextBox"
textbox'multiline=1
dim strArray$[2]
strArray$[0]="aaa"
strArray$[1]="bbb"
strArray$[2]="ccc"
call "*tools/dotnetconvert;toarray",strArray${ALL},dotNetArray
textbox'lines$=dotNetArray'pvxhandle$Format 2
Convert a .NET Array to a PxPlus Array
CALL "*tools/dotnetconvert;fromarray", dotNetArray, pxpArray[$]{ALL}
Where: | ||
dotNetArray | Handle to a .NET array object to convert. | |
pxpArray[$]{ALL} | PxPlus array of numbers or strings to receive output. | |
Example:
Convert a .NET string array of month names to a PxPlus string array:
def object dtInfo,"[.net]System.Runtime,System.Globalization.DateTimeFormatInfo"
call "*tools/dotnetconvert;fromarray",dtInfo'MonthNames,myarray${ALL}See Also
.NET Interface
How To Tutorials (for .NET Interface)
DEF OBJECT Define Windows Object