Please support our C# advertiser: Programming Forums
![]() |
•
•
Join Date: Oct 2004
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 1
•
•
•
•
Originally Posted by cscgal
This might sound silly. But I'm working on a C# assignment for school right now, and I can't get a simple if-else statement to work. Isn't the syntax the same as in C++ or Java?
I want to do one thing if a boolean variable is true, something else if it's not. The "bool" type exists in C#, right?
bool bFirsttime;
if (bFirsttime)
{
//code for true condition
}
else
{
//code for false condition
}
![]() |
Other Threads in the C# Forum
- Previous Thread: Enabling Step Into (#c)
- Next Thread: ADO.Net SQL UPDATE using OleDBAdapter
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Linear Mode