Accessing Indexes for .NET Classes
You can access the indexes of .NET classes in the same way
you access PowerBuilder array elements. However, in standard PowerBuilder applications,
you can reference indexes only using integral datatypes, such as integer, short, long,
and so on.
In the .NET environment, you are not restricted to referencing
indexes as integral types; you can reference the indexes using any
datatypes as parameters.
This example shows how to use a string datatype
to access the index of the .NET hashtable class, countries:
to access the index of the .NET hashtable class, countries:
|
1 2 3 4 5 6 7 8 9 10 11 12 |
#IF Defined PBDOTNET then system.collections.hashtable countries countries = create system.collections.hashtable //Assign value to hashtable countries["Singapore"] = 6 countries["China"] = 1300 countries["United States"] = 200 //Obtain value from hashtable int singaporePopulation, USAPopulation singaporePopulation = countries["Singapore"] USAPopulation = countries["United States"] #END IF |
Parent topic: Support for .NET language features
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest