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; } } } }