c#model 限制字段的输入类型

第一步:

引入引用using System.ComponentModel.DataAnnotations;

第二部:

在字段前添加限制类型

参考地址:http://blog.csdn.net/chengly0129/article/details/7823157

posted @ 2017-09-20 22:15  love飞飞  阅读(592)  评论(0编辑  收藏  举报