TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
c_wiley
NA
57
0
If operators
Oct 23 2003 12:11 PM
Ok I think I know the answer to this but I am going to ask anyway, I an still very new to c#. Is there any way to put an or operator into an if statement: If (lcAge == 21 or lcAge == 22) Or does it have to be: If(lcAge == 21) { } else if(lcAge == 22) { } if it has to be the latter, how do you code get around duplicating code? Do you call functions within the if statements? If(lcAge == 21) { CheckAge(); } else if(lcAge == 22) { CheckAge(); } sorry for the level of question many thanks, Craig
Reply
Answers (
5
)
how to do reference in a console application
For loop problems?