Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IF Statements
Message
 
To
14/08/2002 11:24:31
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, United States
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00689596
Message ID:
00689597
Views:
24
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
Previous
Reply
Map
View

Click here to load this message in the networking platform