|
-
December 9th, 2008, 06:54 PM
#28
Re: Object Validation
Cool, that is similar to what I was thinking about doing. I wasn't sure if it was a good idea or not, but now I know its used by other people.
Was the last code example I posted ok? Is it normal to leave a function with no implementation like I have done?
Also, like CPUWizard said I want to keep my code from duplicating as much as possible. On a type like boolean, which doesn't need to be validated because its always either true or false guranteed. Should I be putting my get; set; accessors in the class itself, or should I be making another class similar to ValidatedString that will take care of the accessors? That would reduce duplication.
Three5Eight
Using: MS C# 08 EE, MS SQL 05 EE, C++ .Net 08 EE, Vista Home Premium, XP Home
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|