c#中封装属性时提示未找到元数据文件1_App_Code.dll
2个回答
展开全部
using System;
using System.Collections.Generic;
using System.Text;
namespace NewsModel
{
public class News
{
private int _nid;
private string _nName;
private string _ntitle;
private string _nkind;
private int _kid;
private string _ncontent;
private string _ntime;
public string Ntime
{
get { return _ntime; }
set { _ntime = value; }
}
public string Ncontent
{
get { return _ncontent; }
set { _ncontent = value; }
}
public int Kid
{
get { return _kid; }
set { _kid = value; }
}
public string Nkind
{
get { return _nkind; }
set { _nkind = value; }
}
public string Ntitle
{
get { return _ntitle; }
set { _ntitle = value; }
}
public string NName
{
get { return _nName; }
set { _nName = value; }
}
public int Nid
{
get { return _nid; }
set { _nid = value; }
}
}
}
类要公共的才可以访问
using System.Collections.Generic;
using System.Text;
namespace NewsModel
{
public class News
{
private int _nid;
private string _nName;
private string _ntitle;
private string _nkind;
private int _kid;
private string _ncontent;
private string _ntime;
public string Ntime
{
get { return _ntime; }
set { _ntime = value; }
}
public string Ncontent
{
get { return _ncontent; }
set { _ncontent = value; }
}
public int Kid
{
get { return _kid; }
set { _kid = value; }
}
public string Nkind
{
get { return _nkind; }
set { _nkind = value; }
}
public string Ntitle
{
get { return _ntitle; }
set { _ntitle = value; }
}
public string NName
{
get { return _nName; }
set { _nName = value; }
}
public int Nid
{
get { return _nid; }
set { _nid = value; }
}
}
}
类要公共的才可以访问
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询