Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to use --> OR in c#
Message
De
06/12/2006 15:24:49
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01175341
Message ID:
01175369
Vues:
8
Hi Gerald

Try this:-
if (MyNum2.Equals("C") || MyNum2.Equals("E"))
{ }
>I am trying to use a multiple OR statement in c# but am getting
>..cannot be applied to operands of type bool and type string
>
>I am trying to (in VFP code)
>if Mynum2 = "C" or MyNum2 = "E" .....
>
>My c~ code is:
>if ( (MyNum2 == "C") || (MyNum2 == "E") )
>
>and MyNum2 is declared as string.
>
>Any help appreciated.
>
>Gerard
>
-=Gary
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform