Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multi-line IF statement in C#
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Multi-line IF statement in C#
Versions des environnements
Environment:
C# 1.1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01026053
Message ID:
01026053
Vues:
51
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform