首页 > Web开发 > 详细

ADO.NET面向对象 属性扩展

时间:2017-11-16 19:22:18      阅读:245      评论:0      收藏:0      [点我收藏+]

例:
public class Users{

private bool _sex;
public bool sex
{
get{_return _sex;}
set{_sex=value}
}
public string sexx
{
get{return _sex?"男":"女";}
}

}

2
public  class nation{
private string  _Nationcode;
public string nationcode{}
public string _nationname;
public string nationname{};



方法:
public string selectname(string ncode){
string result="无";


select * from nation where nationcode=ncode;
result=dr["nationname"].tostring()
return result;}

 

ADO.NET面向对象 属性扩展

原文:http://www.cnblogs.com/sistrong-5880558/p/7845817.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!