validation - Validating properties in c# -
let's suggest got interface , inherit class it,
internal interface ipersoninfo { string firstname { get; set; } string lastname { get; set; } } internal interface irecruitmentinfo { datetime recruitmentdate { get; set; } } public abstract class collaborator : ipersoninfo, irecruitmentinfo { public datetime recruitmentdate { get; set; } public string firstname { get; set; } public string lastname { get; set; } public abstract decimal salary { get; } }
then how validate strings in collaborator class? possible implement inside properties?
or use dataannotations
Comments
Post a Comment