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
Wigger Tolsma
NA
4
3.2k
What does the % operator exactly do?
Aug 9 2013 2:30 PM
Today I had an assignment that told me to only allow numbers through that are a multiplication of 5.
After looking around on the internet I found the % operator. I thought this operator only removed the decimals, for example 5 % 2 equals 2.
But I could use it in my program as if(iWithdraw % 5 == 0){do this and that}.
I'm glad it worked but I still don't know why it worked haha.
Can someone explain this to me?
Reply
Answers (
3
)
Using Directive
C# Code to remove/disable item(s) from dropDownLists