Function Calls on .NET Primitive and Enumerated Types – PB Docs 120


Function Calls on .NET Primitive and Enumerated Types

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.

.NET primitive types

To support function calls on .NET primitive types, the PowerBuilder
.NET compiler (pb2cs) merges the functionality
of these primitive types with the functionality of corresponding
PowerBuilder primitive types. This allows you to use .NET primitive
types and their corresponding PowerBuilder primitive types in a
similar fashion. The following example makes the same ToString function
call on both the .NET System.Int32 datatype
and the PowerScript long datatype:

For a table of equivalencies between .NET and PowerScript
primitive datatypes, see Datatype Mappings.

Note:

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.

.NET enumerated types

Function calls are also supported on .NET enumerated types
that you import to a PowerBuilder .NET target. For example, suppose
you define a .NET enumerated type in a .NET assembly as follows:

PowerBuilder allows you to call the ToString method
on the .NET TimeOfDay enumerated type after you import it to your
target:


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x