|
-
December 10th, 2008, 06:13 PM
#32
Re: Object Validation
Ok, so I think you are saying instead of doing this:
Code:
public Field<bool> field1;
I just use the normal way?
Code:
public Field<string> description;
public bool taxable;
So when I am using a field that doesn't need to be validated then don't use the Field class?
If that's what you are saying I tried to do that but then I got into code duplication, because if I have 6 boolean fields in my class then I have to type 6 get; set; accessors, one for each field. So the reason I put them into Field and didn't assign a validator was so that I could use the get; set; included in Field, instead of typing them over and over again.
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
|