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
Jonathan Mercer
NA
3
0
Or Logic within If statements
Jun 20 2007 10:12 AM
Hey All,
I have been using C# for awhile and I was wondering if there was a short cut when it comes to using the '||' in an if statment. For example. If I have an int i and I want my code to do the same thing if i = 4,6 or 7. I know that I could use a swich statement and or I could use if(i = 4 || i=6 ....) . What I want to do is: if(i= 4 || 6 || 7) Is there a shortcut that would allow this. I have been looking but I haven't been able to find any.
Thanks.
Reply
Answers (
2
)
Server Application Unavailable -Access huge data
drawing on an inserted image at runtime ?