Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IF Statements
Message
 
À
14/08/2002 11:24:31
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00689596
Message ID:
00689597
Vues:
23
Use a == instead of = like:
if (txtUserId.Text.Length == 0)
>Hello,
>
> I just came across something that I don't understand. What is wrong with the following C# code?
>
>if (txtUserId.Text.Length = 0)
>
>The compile error was "Cannot Implicitly convert type 'int' to 'bool'.
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform