Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to determine if property is array, collection, etc
Message
 
 
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:
01355955
Vues:
29
If someone created a class with a property named Count, I wouldn't care what kind of results their class gave me ;-) That would probably be the tip of the iceberg as far as unexpected behavior.

>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
>>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform