You can make function calls on .NET primitive and enumerated types from a PowerBuilder application. The function calls must be made inside a conditional compilation block for a .NET target.
System.Int32 i1 long i2
i1.ToString() i2.ToString()
For a table of equivalencies between .NET and PowerScript primitive datatypes, see Datatype Mappings.
The System.IntPtr and SystemUIntPtr primitive types do not have precise corresponding types in PowerBuilder—they are always treated as long datatypes. Calling functions or modifying properties on these .NET primitive types leads to a compilation error in PowerBuilder.
Public enum TimeOfDay { Morning = 0, AfterNoon, Evening }
#if defined PBDOTNET then ns1.ns2.TimeOfDay daytime daytime = ns1.ns2.TimeOfDay.Morning! daytime.ToString() #end if