Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multi-line IF statement in C#
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Multi-line IF statement in C#
Environment versions
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01026053
Message ID:
01026053
Views:
52
This may sound like a newbie question. Is it possible in C# to wrap the boolean expression for an 'if' condition? For example:
if((1 == 1)
    and (2 ==2))
{
     Console.WriteLine("Good To Go!");
}
If the condition is on one line, there's no problem. If I put it on multiple lines, I get a ') expected' error.
Next
Reply
Map
View

Click here to load this message in the networking platform