Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine if property is array, collection, etc
Message
 
 
À
20/10/2008 08:42:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01355841
Message ID:
01355946
Vues:
22
James,

If oProperty was a pointer to an object that happens to have a Count property you'd get a false positive of it being a collection.

>Would the following work to distinguish between arrays and collections?
>
>lcProperty = 'oObject.oProperty'
>Try
>    lnCount = eval( lcProperty + '.Count')
>    * Collection here
>Catch
>   * Array here
>EndTry
>
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform