2013年2月19日

Self Validation

摘要: public class Others : IValidatableObject { public IEnumerable Validate(ValidationContext validationContext) { if (Name !=... 阅读全文

posted @ 2013-02-19 17:58 fishyk 阅读(187) 评论(0) 推荐(0) 编辑

ValidationAttribute

摘要: public class MaxWordsAttribute : ValidationAttribute { public MaxWordsAttribute() : base(() => { return "{0} has too many words.... 阅读全文

posted @ 2013-02-19 17:39 fishyk 阅读(162) 评论(0) 推荐(0) 编辑

Func<>

摘要: class Program { static void Main(string[] args) { Tee(() => { return "aaa"; }); Console.Read(); } static string ter() { return "aa"; } static void Tee(Func fs) { string ss = fs(); } ... 阅读全文

posted @ 2013-02-19 16:34 fishyk 阅读(208) 评论(0) 推荐(0) 编辑

导航