Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP inlist() in c#
Message
De
03/08/2008 12:34:13
 
 
À
02/06/2008 06:46:55
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01320903
Message ID:
01336160
Vues:
43
>if there any similar vfp inlist() command in C#?
>
>
>for eg.
>
>VFP Code:
>
>IF INLIST(postCode,'001','002','003')
>...
>ENDIF

You may try this one which is more universal:
        ' VFP inlist equivalent
        ' expO1 Item where all the items will be tried to look into
        ' expO2 Param array for a list of items
        Public Function Inlist(ByVal toItem As IComparable, ByVal ParamArray toItems() As IComparable) As Boolean
            Return Array.IndexOf(toItems, toItem) <> -1
        End Function
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform