asp.net中引用同一个项目中的类库 避免goToDefinition时不能到达真正的定义类
更新时间:2011年10月18日 21:32:36 作者:
asp.net中引用同一个项目中的类库 避免 goToDefinition时不能到达真正的定义类
新建一个解决方案: Api
添加类库 APi.Data
APi.Data 新建一个 Entity
public class Entity
{
private int id;
public int Id
{
get { return id; }
set { id = value; }
}
private string name;
public string Name
{
get { return name; }
set { name = value; }
}
}
添加类库 APi.Web
引用 APi.Data.dll
APi.Web下
APi.Data.Entity t = new APi.Data.Entity();
Entity的goToDefinition
结果是:
using System;
namespace APi.Data
{
public class Entity
{
public Entity();
public int Id { get; set; }
public string Name { get; set; }
}
}
而不是:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Api.Data
{
public class Entity
{
private int id;
public int Id
{
get { return id; }
set { id = value; }
}
private string name;
public string Name
{
get { return name; }
set { name = value; }
}
}
}
添加类库 APi.Data
APi.Data 新建一个 Entity
复制代码 代码如下:
public class Entity
{
private int id;
public int Id
{
get { return id; }
set { id = value; }
}
private string name;
public string Name
{
get { return name; }
set { name = value; }
}
}
添加类库 APi.Web
引用 APi.Data.dll
APi.Web下
APi.Data.Entity t = new APi.Data.Entity();
Entity的goToDefinition
结果是:
复制代码 代码如下:
using System;
namespace APi.Data
{
public class Entity
{
public Entity();
public int Id { get; set; }
public string Name { get; set; }
}
}
而不是:
复制代码 代码如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Api.Data
{
public class Entity
{
private int id;
public int Id
{
get { return id; }
set { id = value; }
}
private string name;
public string Name
{
get { return name; }
set { name = value; }
}
}
}
相关文章
ASP.NET MVC4 利用uploadify.js多文件上传
本文主要介绍了ASP.NET MVC4利用uploadify.js实现多文件上传的方法代码。具有很好的参考价值。下面跟着小编一起来看下吧2017-03-03


最新评论