如何在Winforms中使用数据注释验证器?
我喜欢企业库中的验证应用程序块:-)
现在我想在 Winforms 中使用 DataAnnotations,因为我们也使用 asp.net 动态数据。 这样我们就拥有整个公司的共同技术。
而且数据注释应该更容易使用。
我怎样才能在Winforms中做类似的事情,例如 Stephen Walter 在 asp.net MVC 中做了什么?
I like the Validation Application Block from the Enterprise Library :-)
Now i would like to use the DataAnnotations in Winforms, as we use asp.net Dynamic Data as well. So that we have common technologies over the whole company.
And also the Data Annotations should be easier to use.
How can I do something similiar in Winforms like Stephen Walter did within asp.net MVC?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我改编了在 http://blog.codeville.net/category/validation/ 找到的解决方案page/2/
这将允许您使用以下代码来验证使用以下语法的任何对象:
I adapted a solution found at http://blog.codeville.net/category/validation/page/2/
This would allow you to use the following code to validate any object using the following syntax: