例:
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;}
时间: 2024-10-15 18:08:36