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
Rahul Patel
NA
1
1.2k
Validation Checks
Dec 18 2012 9:58 AM
Hi guys,
I have a series of validation checks that i need to complete in order to be able to save a record. I wanted to do this in the way below.
public
override
void
SaveRecord()
{
NameCheck();
PostcodeCheck();
SaveRecord();
}
As you can tell, even if the checks are not met, it still goes through the next method. However, i want the method to stop as soon as it does not fulfill the validation check.
The check in the 'NameCheck' method is if the user does not input a name, then the program displays an error box and does not save the record. The 'PostcodeCheck' is there to ensure that there are no duplicates of the same postcode.
Is this possible?
Kindest Regards,
Rahul Patel
Reply
Answers (
1
)
custom paper size
static method in c#