新建一个解决方案: 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; }
}
}
}
您可能感兴趣的文章:
- go语言的初始化顺序,包,变量,init详解
- Go语言init函数详解
- 详解Angular之constructor和ngOnInit差异及适用场景
- 详解Angular 中 ngOnInit 和 constructor 使用场景
- 为什么不建议在go项目中使用init()
声明:本站(华域联盟www.cnhackhy.com)所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

评论(0)