Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie question about C# operators
Message
De
04/03/2005 10:57:27
 
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00992746
Message ID:
00992751
Vues:
19
This message has been marked as a message which has helped to the initial question of the thread.
I think you're missing a "=":
string PagerDomain = @ConfigurationSettings.AppSettings["PagerDomain"];
if ((PagerDomain == null) || PagerDomain.Length <=0 )
>Could someone explain to me why the following expression works:
>
>
>string PagerDomain = ConfigurationSettings.AppSettings"PagerDomain"];
>if ((PagerDomain != null) && PagerDomain.Length >0 )
>
>
>But this one gives the error:
>
>string PagerDomain =
>@ConfigurationSettings.AppSettings["PagerDomain"];
>if ((PagerDomain = null) || PagerDomain.Length <=0 )
>
>
>The error I get is "Operatore || cannot be applied to operand of type 'string' and 'bool'.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform