Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP inlist() in c#
Message
De
29/01/2013 03:47:40
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01320903
Message ID:
01564441
Vues:
60
>>>>>I don't see how switch can help - switch is only for checking a single variable against predefined values.
>>>>
>>>>That's the problem.... if its not in a blog post, you can't figure it out....Learn to think outside a blog post...
>>>
>>>Can you stop answering my questions in this way? I can figure out if it's possible with a switch, but in this particular case several IF statements are easier to implement. If you have nothing to say about the nature of the question, don't add your comments as they don't help.
>>
>>You said a switch couldn't handle your case..... ergo my reply after Gregory showed you how to do it with a switch.
>
>Gregory's code is way too complicated. I think for what I needed it for the if statements were actually easier to understand and better. Or Viv's solution (I added it in comments as alternative solution, but decided to keep my original).

Your original is ahem buggy - it does not test all nine cases
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform