C# - 刘铁萌笔记
C#——刘铁猛笔记
类、名称空间(简述)
类(class)是构成程序的主体
名称空间(namespace)以树形结构组织类(其他类型)
名称空间:名称空间是用来组织和管理类、接口、结构体等类型的逻辑容器。它可以帮助开发人员避免命名冲突,将相关的类型组织在一起,提高代码的可读性和可维护性。名称空间可以嵌套使用,形成层次结构。在C#中,使用namespace关键字来定义名称空间。
打个比方:
在一个图书馆中,每本书都会有它专属的类放置在一个特定的位置上,那么名称空间就相当于一个图书馆,类就相当于书的类。不同的图书馆有些书的类一样,但其所含书本不一样,因此名称空间也能防止类的名字冲突。
当程序中的一个名称空间中,想要使用另一个名称空间的某一个方法时,需要在程序中名称空间的外部使用using引用所需的名称空间,或者在该名称空间中写出所需名称空间的限定名称。
namespace HelloWorld
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, World!");
}
}
}
当引用的名称空间中有两种或两种以上的名称空间中包含同名的类,使用这个类时也需要写出限制性名称。
类库
类库引用时使用名称空间的物理基础,使用名称空间时,可以点开References(引用)来检查是否有包含该名称空间的类库(类库简称dll)
在C#中,类库(Class Library)指的是一组封装了一些相关功能的类、接口和其他类型的集合。类库通常用于封装通用的功能,以便在多个应用程序中重复使用。
类库可以包含各种类型的功能,例如数据结构、算法、I/O操作、网络通信、图形界面控件等。C#本身提供了一些标准的类库,如.NET Framework中的类库,它包含了大量的基本功能和工具类,用于支持C#程序的开发。
除了使用.NET Framework提供的类库之外,开发人员也可以自己编写类库,以封装自己的功能并在不同的项目中重复使用。这样可以提高代码的复用性,降低开发成本,同时也有利于代码的维护和管理。
在C#中,类库通常以DLL(Dynamic Link Library)的形式存在,可以通过引用的方式在C#项目中使用。通过引用类库,开发人员可以轻松地使用其中封装的功能,而无需关心具体的实现细节,从而提高开发效率并降低代码的重复编写。
一个类库可以包含一个或多个名称空间,用于组织其中的类型。
黑盒引用(无法看源代码)
黑盒引用(Black Box Reference):指的是只能通过接口或基类来引用对象的方式。在黑盒引用中,只能访问对象的公共成员或通过接口暴露的方法,而无法直接访问对象的私有成员或实现细节。这种引用方式更加封装和安全,符合面向对象编程的封装原则。
-
引用一个类库时,右击reference
-
引用一个类库时,它可能受限于更底层的类库,因此引用时还需要引用其更底层的类库,为了避免这个麻烦,可以引用NuGet,类似于一个类库包。
白盒引用
白盒引用(White Box Reference):指的是可以直接访问对象的私有成员或实现细节的引用方式。在白盒引用中,可以直接访问对象的所有成员,包括私有成员和实现细节。这种引用方式可能会破坏对象的封装性,增加耦合度,不利于代码的维护和扩展。
引用自己已有的项目,此时需要将该项目添加到自己的solution里面,之后再右击reference,再solution里勾选该类库。
图中有新建项和现有项,若要使用新建项,在打开时就要选择class library项目。
总的来说,黑盒引用更符合面向对象编程的封装和抽象原则,而白盒引用则更容易导致代码的耦合和依赖性。在设计和编写代码时,应该尽量使用黑盒引用,只暴露必要的接口和方法,避免直接暴露对象的内部实现细节。
依赖关系
在C#中,依赖关系指的是一个类或对象在实现功能时依赖于另一个类或对象的情况。依赖关系是面向对象编程中的一个重要概念,它描述了一个对象使用另一个对象提供的功能或服务的情况。
依赖关系通常体现在类之间的关联或调用关系上。当一个类需要使用另一个类的功能时,它就会依赖于这个类。这种依赖关系可以通过构造函数注入、属性注入或方法参数传递等方式来实现。
依赖关系的存在可以带来一些好处,如提高代码的复用性、降低耦合度、便于单元测试等。但如果依赖关系设计不当,可能会导致代码的脆弱性、难以维护和扩展等问题。
在实际开发中,我们通常会借助依赖注入(Dependency Injection)等技术来管理和解决类之间的依赖关系,以提高代码的可维护性和灵活性。通过合理设计和管理依赖关系,可以使代码更加模块化、可测试和可扩展。
类、对象、类与对象的关系
类
类(Class)是一种模板或蓝图,用于描述对象的属性和行为。类定义了对象的结构和行为,包括属性(字段)和方法。在C#中,类是定义对象的基本单位,通过类可以创建对象的实例。
对象
在C#中,对象(Object)是类的实例化(Instance)结果,是内存中的一个具体实体,具有属性和行为。对象是类的具体化,通过实例化类可以创建对象。对象在内存中占据一定的空间,包含了类中定义的属性和方法的具体数值和实现。
类与对象的关系
- 类是对象的模板,定义了对象的属性和行为,描述了对象的结构。
- 对象是类的实例化结果,是类的具体实体,具有类定义的属性和行为。
- 通过类可以创建多个对象,每个对象都是类的一个实例,但它们在内存中是独立存在的,各自拥有自己的属性值。
- 类定义了对象的结构和行为,而对象是类的具体化,实际应用中我们操作的是对象。
简单来说,就是你自己写了一个类,这个类就像一个概念一样,它包含着一些用来形容这个概念的东西,你想要使用这个类时候,你就需要创建一个对象,之后用这个对象来进行你后续的操作。
比如你写了一个飞机的类,但这个类是个概念,你能开概念吗?肯定不行,你要开的是飞机这个机器,所以你就要创建一个飞机开。
类的三大成员
前三个后面会详细说明
小知识–使用MSDN文档
把光标移到你所使用的类上,按f1键
静态成员与非静态成员
静态成员是属于类的成员,而不是属于类的实例(对象)的成员。静态成员可以被类的所有实例共享,可以通过类名直接访问,不需要创建类的实例。在内存中,静态成员只有一份拷贝,被所有实例共享。
非静态成员则是属于类的实例(对象)的成员,每个对象都有自己的一份。非静态成员需要通过对象来访问,每个对象都有自己的非静态成员的拷贝。
构成c#的语言的基本元素:关键字,操作符,标识符,标识符号,文本,注释。
小知识–声明变量和类时名称的要求
声明变量时变量名采用驼峰命名法,即首单词字母要小写,后续单词字母大写
声明一个类时名称时,单词都要大写
类型
什么是类型
强类型语言、弱类型语言
强类型指的是声明的变量是什么类型,以后它就是什么类型,弱类型指声明的变量可以是多个类型
-
强类型语言是指在编程时要求严格定义变量的数据类型,不允许不同类型之间的隐式转换。
-
在强类型语言中,变量的数据类型必须在编译时就确定,并且不会发生自动类型转换。
-
强类型语言通常具有更严格的类型检查,能够在编译时捕获一些潜在的类型错误。
-
弱类型语言是指在编程时对变量的数据类型要求较为灵活,允许不同类型之间的隐式转换。
-
在弱类型语言中,变量的数据类型通常可以在运行时动态确定,允许自动类型转换。
-
弱类型语言通常具有更灵活的类型系统,但也可能导致一些难以发现的类型错误。
小知识–c#中用dynamic定义的变量可以让该变量在不同时刻赋任何类型的值。
namespace DynamicSample
{
internal class Program
{
static void Main(string[] args)
{
dynamic myVar = 100;
Console.WriteLine(myVar);
myVar = "Mr.Okay!";
Console.WriteLine(myVar);
}
}
}
类型在C#语言中的作用
C#语言的类型系统–五大数据类型
变量
变量是以变量名为对应的内存地址为起点,以其数据类型所要求的存储空间为长度的一块内存区域(变量名中要么存储的是值类型的值,或者引用类型的地址)。
静态变量
- 静态变量属于类,而不是类的特定实例。
- 静态变量在类加载时被初始化,只有一份存储空间,所有类的实例共享同一份静态变量。
- 静态变量使用static关键字声明,在内存中存储在静态存储区域。
- 可以通过类名直接访问静态变量,无需实例化对象。
- 通常用于存储类级别的信息,如常量、计数器等。
实例变量
- 实例变量属于类的实例(对象),每个对象都有自己的实例变量副本。
- 实例变量在创建对象时被分配内存空间,并随着对象的销毁而释放。
- 实例变量不使用static关键字声明,每个对象都有自己的实例变量。
- 必须通过对象实例来访问实例变量。
数组元素
数组元素(Array Element):数组是一种数据结构,用于存储相同类型的多个元素。数组元素指的是数组中的单个数据项,通过索引访问。例如,对于整型数组 int[] numbers = {1, 2, 3, 4, 5};,numbers[0] 表示数组 numbers 中的第一个元素,其值为 1。
值参数
值参数(Value Parameter):值参数是一种参数传递方式,将参数的值传递给方法。在方法内部对值参数的修改不会影响到原始值。在方法签名中,参数前没有 ref 或 out 关键字的参数均为值参数。
引用参数
引用参数(Reference Parameter):引用参数是一种参数传递方式,将参数的引用传递给方法,使得在方法内部对参数的修改会影响到原始值。在方法签名中,参数前加上 ref 关键字表示引用参数。
输出参数
输出参数(Output Parameter):输出参数是一种特殊的引用参数,用于从方法中返回多个值。在方法签名中,参数前加上 out 关键字表示输出参数,调用方法时必须为输出参数赋值。
局部变量
局部变量(Local Variable):局部变量是在方法、构造函数或代码块内部声明的变量,只在声明的作用域内有效。局部变量在声明时必须初始化,可以在声明时或稍后赋值。
值类型、引用类型声明的变量在内存中的分配
值类型在内存分配的时候会根据该类型所需的空间来分配字节,引用类型在内存分配的时候只会分配四个字节,没有引用实例时该字节的二进制都是零,当创建实例后会把堆内存的地址放进该变量中,在堆内存中分配空间时才会计算该变量真正所需要的空间。
变量的默认值
成员变量分配好空间后不赋值时会自动都赋值成0,但本地变量不赋值会报错。
装箱和拆箱
装箱:当一个引用类型的变量发现赋予的值时放在栈上的值类型的值,那么其会在堆中的一个空位置上存储这个值,并把该位置的地址赋值给引用类型的变量上。
-
装箱是将值类型转换为引用类型的过程。
-
当将值类型赋值给一个对象类型(如 object)时,会发生装箱操作,将值类型的数据包装在一个堆分配的对象中。
-
装箱会导致性能开销,因为需要在堆上分配内存来存储值类型的数据,并且需要进行数据复制。
拆箱:当一个值类型的变量发现赋予的值时引用类型,那么其会根据地址找到该值赋给自己
- 拆箱是将引用类型转换为值类型的过程。
- 当从对象类型(如 object)中获取值类型数据时,需要进行拆箱操作,将包装在对象中的数据提取出来转换为值类型。
- 拆箱需要进行类型检查和数据复制,可能会导致性能开销。
方法
方法的由来
方法的声明与调用
当一个函数以类的成员出现时简称为方法
构造器
什么是构造器
在 C# 中,构造器(Constructor)是一种特殊类型的方法,用于在创建类的实例(对象)时初始化对象的状态。构造器的作用是初始化对象的成员变量、属性或执行其他必要的初始化操作。以下是构造器的一些特点:
命名与特点:
-
构造器的名称与类名相同。
-
构造器没有返回类型,包括 void。
-
构造器可以重载,即同一个类可以有多个不同参数列表的构造器。
初始化对象:
- 在实例化对象时,构造器会被自动调用,用于初始化对象的状态。
- 构造器可以初始化对象的成员变量、属性,或执行其他必要的初始化操作。
默认构造器:
- 如果没有显式定义构造器,C# 会提供一个默认构造器(无参数构造器),用于初始化对象。
- 如果显式定义了带参数的构造器,但没有定义无参数构造器,那么默认构造器就不会被提供。
对象的创建
当通过 new 关键字创建一个类的实例时,会在内存中分配一块空间来存储该对象的数据。这个空间包括对象的字段、属性和方法等信息。
构造器的调用
在对象创建的过程中,会调用构造器来初始化对象的各个部分。构造器可以有多个重载形式,根据参数列表的不同进行选择调用。
内存分配
在调用构造器之前,系统会先为对象分配内存空间。构造器负责对这块内存空间进行初始化,包括对字段、属性等成员变量的赋值操作。
构造器的执行顺序
如果类的继承关系中包含父类和子类,构造器的执行顺序是先执行父类的构造器,然后执行子类的构造器。这确保了对象的所有部分都能得到正确的初始化。
构造器的作用
构造器可以用来初始化对象的状态,进行一些必要的设置操作,确保对象在创建后处于一个合理的状态。
快捷生成构造器
//创建构造器快捷键
//ctor 按两下tab键
public Student(int initId,string initName)
{
}
声明无参数构造器(也可以称作默认构造器)
namespace ConstructorExample
{
class Program
{
static void Main(string[] args)
{
Student stu2 = new Student();
Console.WriteLine(stu2.ID);
Console.WriteLine(stu2.Name);
}
}
class Student
{
//创建构造器快捷键
//ctor 按两下tab键
public Student()
{
this.ID = 1;
this.Name = "No name";
}
public int ID;
public string Name;
}
}
声明带参数的构造器(实例化一个对象时必须对构造器内的成员赋值)
为了防止声明一个类时忘记对其字段赋值,可以使用带参数的构造函数。
namespace ConstructorExample
{
class Program
{
static void Main(string[] args)
{
Student stu = new Student(2,"Mr.Okay");
Console.WriteLine(stu.ID);
Console.WriteLine(stu.Name);
}
}
class Student
{
//声明
public Student(int initId, string initName)
{
this.ID = initId;
this.Name = initName;
}
public int ID;
public string Name;
}
}
重载
什么是重载
方法的重载(Method Overloading)是指在同一个类中可以定义多个具有相同名称但参数列表不同的方法。通过方法重载,可以在同一个类中使用相同的方法名来执行不同的操作,根据传入的参数列表的不同来确定调用哪个方法。
比如Console.WriteLine就是一种重载,可以输出多种类型
小知识–Debug操作
设置断点,当摁f5时会在设置的断点处停止运行
此时调用堆栈中第一行是该函数,第二行是调用该函数的位置
Step-in是一个语句一个语句进行,Step-over是若该断点在是一个调用函数,直接返回调用函数后的结果,Steo-out是寻找调用该函数的地方。
操作符
越靠上的操作符优先级越高,越靠下的操作符优先级越低
什么是操作符?
操作符不能脱离与它关联的数据类型
namespace CreateOperator
{
internal class Program
{
static void Main(string[] args)
{
int x = 5;
int y = 4;
int z = x / y;
Console.WriteLine(z);
double a = 5.0;
double b = 4.0;
double c = a / b;
Console.WriteLine(c);
}
}
}
演示结果
2
Mr.Okay
请按任意键继续. . .
简记法
namespace CreateOperator
{
internal class Program
{
static void Main(string[] args)
{
Person person1 = new Person();
Person person2 = new Person();
person1.Name = "Dear";
person2.Name = "Dear's wife";
List<Person> nation = person1+ person2;
foreach(var p in nation)
{
Console.WriteLine(p.Name);
}
}
}
//创建一个类型
class Person
{
public string Name;
//public static List<Person> GetMarry(Person p1, Person p2)
//简记法————如下
public static List<Person> operator +(Person p1, Person p2)
{
List<Person> people = new List<Person>();
people.Add(p1);
people.Add(p2);
for(int i = 0; i < 11; i++)
{
Person child = new Person();
child.Name = p1.Name + "&" + p2.Name + "s child";
people.Add(child);
}
return people;
}
}
}
演示结果
Dear
Dear's wife
Dear&Dear's wifes child
Dear&Dear's wifes child
Dear&Dear's wifes child
Dear&Dear's wifes child
Dear&Dear's wifes child
Dear&Dear's wifes child
Dear&Dear's wifes child
Dear&Dear's wifes child
Dear&Dear's wifes child
Dear&Dear's wifes child
Dear&Dear's wifes child
请按任意键继续. . .
优先级与运算顺序
同优先级操作符从左到右
列如:
namespace OperatorPriority
{
internal class Program
{
static void Main(string[] args)
{
int x;
x = 3 + 4 + 5;
Console.WriteLine(x);
}
}
}
结果
12
请按任意键继续. . .
带有赋值功能的操作符的运算顺序都是从右向左
代码:
namespace OperatorPriority
{
internal class Program
{
static void Main(string[] args)
{
int x = 100;
int y = 200;
int z = 300;
x += y += z;
Console.WriteLine(x);
Console.WriteLine(y);
Console.WriteLine(z);
}
}
}
600
500
300
请按任意键继续. . .
外层命名空间的子集命名空间(静态成员属于类)
各个操作符的作用
x.y 操作符:访问外层名称空间中的子名称空间,访问名称空间中的类型,访问类型中的静态成员,访问对象的成员。
//System.IO.File.Create("D:\\HelloWorld.text");
Form myForm = new Form();
myForm.Text = "Hello,World!";
myForm.ShowDialog();
f(x) 操作符:方法调用
a[x] 操作符:元素访问操作符
new 操作符:在内存中构造一个类型的实例,并且立刻调用这个实例的实例构造器(或初始化器),如果在new操作符有赋值符号时,会把该实例的内存地址赋给该变量。
在C#中,并不是构造类型时都需要使用new操作符,c#会在常用的类型构建实例时省去new操作符。
new操作符也可用于方法的继承和派生(让子类隐藏父类)
typeof 操作符:查看一个类型的内部结构
enum 枚举类型
default 操作符:获取一个类型的默认值
checked 操作符:用于检测程序运行时有没有类型溢出
unchecked 操作符:不检测程序运行时有没有类型溢出
checked和unchecked不仅有操作符用法,还有上下文用法
delegate 操作符:一般用于委托,在当作操作符时是用来声明匿名方法,该方法是只执行一次
委托——代码演示:
namespace OperatorsExample
{
internal class Program
{
static void Main(string[] args)
{
//委托
Calculator c = new Calculator();
Action myAction = new Action(c.PrintHello);
myAction();
}
}
class Calculator
{
public void PrintHello()
{
Console.WriteLine("Hello");
}
}
}
结果:Hello
default类型
var关键字 功能 帮忙声明隐式声明变量
namespace OperatorsExample
{
internal class Program
{
static void Main(string[] args)
{
//Dictionary类里的value值类型是Student
Dictionary<string,Student> stuDic = new Dictionary<string, Student>();
for(int i = 1;i<= 100; i++)
{
Student stu = new Student();
stu.Name = "s_" + i.ToString();
stu.Score = 100 + i;
stuDic.Add(stu.Name, stu);
}
Student number6 = stuDic["s_6"];
Console.WriteLine(number6.Score);
}
}
class Student
{
public string Name;
public int Score;
}
}
new 操作符:在内存中构造一个类型的实例,并且立刻调用这个实例的实例构造器(或初始化器),如果在new操作符有赋值符号时,会把该实例的内存地址赋给该变量。
new操作符和var关键字的用法:是为匿名类型创建对象,用隐式类型变量来引用实例
namespace OperatorsExample
{
internal class Program
{
static void Main(string[] args)
{
Form myForm = new Form() { Text = "Hello" };
//是为匿名类型创建对象,用隐式类型变量来引用实例
var person = new { Name = "Qi", Age = 21 };
Console.WriteLine(person.Name);
Console.WriteLine(person.Age);
Console.WriteLine(person.GetType().Name);
}
}
}
拓展类与类之间的继承
namespace OperatorsExample
{
class Program
{
static void Main(string[] args)
{
Student stu = new Student();
stu.Report();
CsStudent csStu = new CsStudent();
csStu.Report();
}
}
class Student
{
public void Report()
{
Console.WriteLine("I'm a student");
}
}
class CsStudent : Student
{
//重写 子类隐藏父类
new public void Report()
{
Console.WriteLine("I'm CS student");
}
}
}
检查异常
delegate 操作符:一般用于委托,在当作操作符时是用来声明匿名方法,该方法是只执行一次
改进为
->操作符
下去自己练习
类型转换
sizeof 操作符:用于查询结构体类型的字节长度,其也可以检测自定义的结构体类型的字节长度,但要放在不安全的上下文中。
& 操作符:取地址操作符,取某个对象的地址。
- 操作符:找到指针所指向的变量
~ 操作符:取反操作符。
- 操作符:取反操作后+1。
(T)x 操作符:强制转换操作符
<< >> 操作符:<< 操作符补进来的都是0,>>操作符正数补进来的是0,负数补进来的是1
is 操作符:用于检测一个对象是不是某一类型
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Permissions;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
internal class Program
{
static void Main(string[] args)
{
Student stu = new Student();
bool res = stu is Student;
Console.WriteLine(res);//True
Student stu2 = null;
res = stu2 is Student;
Console.WriteLine(res);//false
res = stu is Animal;
Console.WriteLine(res);//True
Human human = new Human();
res = human is Student;
Console.WriteLine(res);//False
}
}
class Animal
{
public void Eat()
{
Console.WriteLine("Eating...");
}
}
class Human : Animal
{
public void Think()
{
Console.WriteLine("Thinking...");
}
}
class Student:Human
{
public void Study()
{
Console.WriteLine("I want to play");
}
}
}
as 操作符(强制类型转化)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Permissions;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
internal class Program
{
static void Main(string[] args)
{
object o = new Student();
Student stu = o as Student;//如果o是Student类型,那么就把该地址赋值给stu,否则赋值null;
if(stu!=null)
{
stu.Study();
}
}
}
class Animal
{
public void Eat()
{
Console.WriteLine("Eating...");
}
}
class Human : Animal
{
public void Think()
{
Console.WriteLine("Thinking...");
}
}
class Student:Human
{
public void Study()
{
Console.WriteLine("I want to play");
}
}
}
?? 操作符:通常情况下值类型不能赋值null,但Nullable<数据类型>声明的变量可以,或者在值类型后加一个? 。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Permissions;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
internal class Program
{
static void Main(string[] args)
{
Nullable<int> x = null;
int? y = null;
Console.WriteLine(x);
Console.WriteLine(x.HasValue);
x = x ?? 1;//如果x是null值,那就把x赋值成1;
Console.WriteLine(x);
}
}
}
?: 操作符:if,else的简写
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Permissions;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
internal class Program
{
static void Main(string[] args)
{
int x = 80;
string s = String.Empty;
s = x >= 60 ? "Pass" : "False";//如果真就返回:前面的值,否则返回:后面的值
Console.WriteLine(s);
}
}
}
类型转换
隐式类型转换
代码演示:
namespace ConversionExample
{
internal class Program
{
static void Main(string[] args)
{
int x = int.MaxValue;
//小往大转就隐式
long y = x;
Console.WriteLine(y);
}
}
}
结果
2147483647
请按任意键继续. . .
子类向父类转换
namespace ConversionExample
{
internal class Program
{
static void Main(string[] args)
{
Teacher t = new Teacher();
Human h = t;
Animal a = h;
a.Eat();
}
}
class Animal
{
public void Eat()
{
Console.WriteLine("Eating...");
}
}
class Human : Animal
{
public void Think()
{
Console.WriteLine("Who I am?");
}
}
class Teacher : Human
{
public void Teach()
{
Console.WriteLine("I teach programming");
}
}
}
显示类型转换
显示类型转换就是在转换对象中构造一个目标类型对象的构造器
namespace ConversionExample
{
internal class Program
{
static void Main(string[] args)
{
Stone stone = new Stone();
stone.Age = 5000;
//隐式类型转换 Monkey wukongSun = stone;
Monkey wukongSun = (Monkey)stone;
Console.WriteLine(wukongSun.Age);
}
}
class Stone
{
public int Age;
//隐式类型转换 public static implicit operator Monkey(Stone stone)
//显示类型转换
public static explicit operator Monkey(Stone stone)
{
Monkey m = new Monkey();
m.Age = stone.Age/500;
return m;
}
}
class Monkey
{
public int Age;
}
}
tips:将explici改成implicit后就能把显式类型转变成隐式类型。
表达式
表达式是一种专门求值的语法实体,可以有一个或多个操作数和零个或多个操作符组成
访问事件 An event access
索引访问表达式
语句
c#语句的定义
参考c#定义文档
虚线以上需要熟练使用
const常量的值是不能够被改变的
字段
C语言参考
代码小记:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DataMemberExample
{
class Program
{
static void Main(string[] args)
{
List<Student> stuList = new List<Student>();
for(int i = 0; i < 100; i++)
{
Student stu = new Student();
stu.Age = 24;
stu.Score = i;
stuList.Add(stu);
}
int totalAge = 0;
int totalScore = 0;
foreach(var stu in stuList)//在一组中一个一个迭代
{
totalAge += stu.Age;
totalScore += stu.Score;
}
Student.AverageAge = totalAge / Student.Amount;
Student.AverageScore = totalScore / Student.Amount;
Student.ReportAmount();
Student.ReportAverageAge();
Student.ReportAverageScore();
}
}
class Student
{
public int Age;//实例字段,创建的对象可用的成员变量
public int Score;
public readonly int id=100;//声明一个动态只读字段,只有一次机会对其赋值,就是在它的构造器中
//如果在创建的对象中没有对id进行赋值,那么id的值就是100,否则就是在构造器中赋予的值
public static readonly Color WColor = new Color() { red = 0, blue = 0, green = 0 };//声明一个静态只读字段
public static int AverageAge;//静态字段,仅类可用
public static int AverageScore;
public static int Amount;
public Student()
{
Student.Amount++;
}
public static void ReportAmount()
{
Console.WriteLine(Student.Amount);
}
public static void ReportAverageAge()
{
Console.WriteLine(Student.AverageAge);
}
public static void ReportAverageScore()
{
Console.WriteLine(Student.AverageScore);
}
}
}
静态只读字段也不能被复制 功能只能被实例保存
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Schema;
namespace DataMemberExample
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(Brush.DefaultColor.Red);
Console.WriteLine(Brush.DefaultColor.Green);
Console.WriteLine(Brush.DefaultColor.Blue);
//静态初始化之后不能被赋值
//Brush.DefaultColor = new Color() { Red = 0, Green = 0, Blue = 0 };
}
}
struct Color
{
public int Red;
public int Green;
public int Blue;
}
class Brush
{
//public static readonly Color DefaultColor = new Color() { Red = 0, Green = 0, Blue = 0 };
//静态构造函数里静态构造器
public static readonly Color DefaultColor;
static Brush()
{
Brush.DefaultColor = new Color() { Red = 0, Green = 0, Blue = 0 };
}
}
}
实例字段的初始化时机实在创建一个对象的时候进行,静态字段的初始化时机实在运行环境加载该数据类型的时候,并且静态字段的初始化执行一次,即第一次被加载的时候。
set与get方法
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PropertyExample
{
internal class Program
{
static void Main(string[] args)
{
Student stu1 = new Student();
stu1.Age = 20;
Student stu2 = new Student();
stu2.Age = 20;
Student stu3 = new Student();
stu3.Age = 200;
int avgAge = (stu1.Age + stu2.Age + stu3.Age) / 3;
Console.WriteLine(avgAge);
}
}
class Student
{
public int Age;
}
}
改进之后的方法 set与get方法
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace PropertyExample
{
internal class Program
{
static void Main(string[] args)
{
Student stu1 = new Student();
stu1.SetAge(20);
Student stu2 = new Student();
stu2.SetAge(20);
Student stu3 = new Student();
stu3.SetAge(80);
int avgAge = (stu1.GetAge() + stu2.GetAge() + stu3.GetAge()) / 3;
Console.WriteLine(avgAge);
}
}
class Student
{
//public int Age;
private int age;
public int GetAge()
{
return this.age;
}
public void SetAge(int value)
{
if(value >= 0 && value <= 120)
{
this.age = value;
}
else
{
throw new Exception("Age value has error.");
}
}
}
}
演化
using System;
using System.Collections.Generic;
using System.Data.SqlTypes;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace PropertyExample
{
internal class Program
{
static void Main(string[] args)
{
try
{
Student stu1 = new Student();
stu1.Age = 20;
Student stu2 = new Student();
stu2.Age = 20;
Student stu3 = new Student();
stu3.Age = 20;
int avgAge = (stu1.Age + stu2.Age + stu3.Age) / 3;
Console.WriteLine(avgAge);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
class Student
{
//public int Age;
private int age;
public int Age
{
get
{
return this.age;
}
set
{
if (value >= 0 && value <= 120)
{
this.age = value;
}
else
{
throw new Exception("Age value has error");
}
}
}
public int GetAge()
{
return this.age;
}
public void SetAge(int value)
{
if(value >= 0 && value <= 120)
{
this.age = value;
}
else
{
throw new Exception("Age value has error.");
}
}
}
}
属性
什么是属性
属性的声明
静态属性
静态属性(Static Property)是属于类本身的属性,而不是类的实例。可以通过类名直接访问静态属性,而不需要创建类的实例。静态属性在整个应用程序中只有一份副本,可以用于存储类级别的信息。
实例属性
实例属性(Instance Property)是指属于类的实例(对象)的属性。每个类的实例都有自己的一组属性值,这些属性值可以在实例化对象后进行访问和修改。实例属性与静态属性不同,静态属性属于类本身,而实例属性属于类的实例。
只读属性
只读属性(Read-only Property)是指只提供了 Get 访问器的属性,即只能读取属性值,不能修改。只读属性在初始化后不能再被修改,可以用于提供对象的只读视图。
属性也是一种语法
声明属性时 快捷键:propfull 再按两下tab键
//声明属性时 快捷键:propfull 再按两下tab键
private int myVar;
public int MyProperty
{
get { return myVar; }
set { myVar = value; }
}
静态属性报出异常
using System;
using System.Collections.Generic;
using System.Data.SqlTypes;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace PropertyExample
{
internal class Program
{
static void Main(string[] args)
{
try
{
Student.Amount = -100;//抛异常
Console.WriteLine(Student.Amount);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
class Student
{
//public int Age;
private int age;
public int Age//属性(实例属性)
{
get//用于返回成员变量的值
{
return this.age;
}
set//用于设置成员变量的值
{
if (value >= 0 && value <= 120)//上下文关键词,value就是传进来的值,不需要声明
{
this.age = value;
}
else
{
throw new Exception("Age value has error");
}
}
}
private static int amount;
public static int Amount//静态属性
{
get { return amount; }
set {
if (value >= 0)
{
Student.amount = value;
}
else
{
throw new Exception("Amount has error");
}
}
}
}
}
结果:
Amount has error
请按任意键继续. . .
动态计算值的属性
主动计算canwork的值
using System;
using System.Collections.Generic;
using System.Data.SqlTypes;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace PropertyExample
{
internal class Program
{
static void Main(string[] args)
{
try
{
Student stu1 = new Student();
stu1.Age = 16;
Console.WriteLine(stu1.CanWork);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
class Student
{
private int age;
public int Age
{
get { return age; }
set
{ age = value;
}
}
private bool canWork;
public bool CanWork //动态计算值的属性,并且是主动计算这个值
{
get
{
if (this.age >= 18)
{
return true;
}
else
{
return false;
}
}
}
被动
using System;
using System.Collections.Generic;
using System.Data.SqlTypes;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace PropertyExample
{
internal class Program
{
static void Main(string[] args)
{
try
{
Student stu1 = new Student();
stu1.Age = 12;
Console.WriteLine(stu1.CanWork);
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
}
class Student
{
private int age;
public int Age
{
get { return age; }
set
{ age = value;
//被动引用时
this.CalcumateCanWork();
}
}
private bool canWork;
public bool CanWork //动态计算值的属性,并且是主动计算这个值
{
get
{
return canWork;
}
}
//以下是被动计算
private void CalcumateCanWork()
{
if (this.age >= 16)
{
this.canWork=true;
}
else
{
this.canWork=false;
}
}
}
}
索引器
什么是索引器
在C#中,索引器(Indexer)是一种特殊的属性,允许类的实例像数组一样通过索引来访问和设置对象的元素。通过索引器,可以为类提供类似数组的访问方式,使得对象可以像集合一样进行索引访问。
索引器通常用于实现集合类或类似集合的数据结构,使得可以通过类似数组的语法来访问对象的元素。索引器可以定义多个重载版本,每个版本可以接受不同数量或类型的参数,以便支持不同的索引方式。
相关代码
public class MyCollection
{
private string[] data = new string[3];
// 索引器的定义
public string this[int index]
{
get { return data[index]; }
set { data[index] = value; }
}
}
class Program
{
static void Main()
{
MyCollection collection = new MyCollection();
// 设置索引器的值
collection[0] = "Item 1";
collection[1] = "Item 2";
collection[2] = "Item 3";
// 获取索引器的值并输出
Console.WriteLine(collection[0]);
Console.WriteLine(collection[1]);
Console.WriteLine(collection[2]);
}
}
代码演示:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IndexerExample
{
internal class Program
{
static void Main(string[] args)
{
Student stu = new Student();
stu["Math"] = 90;
var mathScore = stu["Math"];
Console.WriteLine(mathScore);
}
}
//索引器声明
class Student
{
private Dictionary<string, int> scoreDictionary = new Dictionary<string, int>();
public int? this[String subject]
{
get
{
if (this.scoreDictionary.ContainsKey(subject))
{
return this.scoreDictionary[subject];
}
else
{
return null;
}
}
set
{
if(value.HasValue == false)
{
throw new Exception("Score cannot be null.");
}
if (this.scoreDictionary.ContainsKey(subject))
{
this.scoreDictionary[subject] = value.Value;
}
else
{
this.scoreDictionary.Add(subject, value.Value);
}
}
}
}
}
常量
参数
传值参数
传值参数(值类型)
声明时不带修饰符的形参是值形参。一个值形参对应于一个局部变量,只是它的初始值来自该方法调用所提供的相应实参。
当形参是值形参时,方法调用中的对应实参必须是表达式,并且它的类型可以隐式转换(第 6.1 节)为形参的类型。
允许方法将新值赋给值参数。这样的赋值只影响由该值形参表示的局部存储位置,而不会影响在方法调用时由调用方给出的实参。
代码演示:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ParametersExample
{
internal class Program
{
static void Main(string[] args)
{
//实例方法,先创建方法的实例
Student stu = new Student();
int y = 100;
stu.AddOne(y);
Console.WriteLine(y);
}
}
//方法声明
class Student
{
public void AddOne(int x)//x参数是传值参数,传进来的值会在方法体内部有一个副本,改变的是副本的值,并不会影响方法体外的值
{
x = x + 1;
Console.WriteLine(x);
}
}
}
传值参数(引用类型)
创建新对象
不创建对象
代码演示:
创建对象
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ParametersExample
{
internal class Program
{
static void Main(string[] args)
{
Student stu = new Student() { Name = "Tim" };
SomeMethod(stu);//打印出来是Tom 因为参数传进来时,SomeMethod方法给Name赋了一个新值,所以打印出来的是Tom
Console.WriteLine(stu.Name);//这个是方法外部变量所引用的实例没有变
}
//生
推荐阅读
-
C# - 刘铁萌笔记
-
中文顶刊上用准自然实验识别的实证文章有哪些?有的附程序和code, 不看至少需要收藏一下!-经济研究 [1]刘啟仁,赵灿.税收政策激励与企业人力资本升级[J].经济研究,2020,55(04):70-85. [2]李广众,朱佳青,李杰,李新春.经理人相对绩效评价与企业并购行为:理论与实证[J].经济研究,2020,55(03):65-82. [3]张克中,欧阳洁,李文健.缘何“减税难降负”:信息技术、征税能力与企业逃税[J].经济研究,2020,55(03):116-132. [4]周波,赵国昌.中国间接税税负归宿研究:汽车市场准自然实验的证据[J].经济研究,2020,55(03):133-147. [5]毛其淋.贸易政策不确定性是否影响了中国企业进口?[J].经济研究,2020,55(02):148-164. [6]刘瑞明,毛宇,亢延锟.制度松绑、市场活力激发与旅游经济发展——来自中国文化*改革的证据[J].经济研究,2020,55(01):115-131. [7]施新政,高文静,陆瑶,李蒙蒙.资本市场配置效率与劳动收入份额——来自股权分置改革的证据[J].经济研究,2019,54(12):21-37. [8]王永钦,吴娴.中国创新型货币政策如何发挥作用:抵押品渠道[J].经济研究,2019,54(12):86-101. [9]唐宜红,俞峰,林发勤,张梦婷.中国高铁、贸易成本与企业出口研究[J].经济研究,2019,54(07):158-173. [10]张琦,郑瑶,孔东民.地区环境治理压力、高管经历与企业环保投资——一项基于《环境空气质量标准(2012)》的准自然实验[J].经济研究,2019,54(06):183-198. [11]冯晨,陈舒,白彩全.长期人力资本积累的历史根源:制度差异、儒家文化传播与国家能力塑造[J].经济研究,2019,54(05):146-163. [12]刘柏惠,寇恩惠,杨龙见.增值税多档税率、资源误置与全要素生产率损失[J].经济研究,2019,54(05):113-128. [13]陈林,万攀兵.《京都议定书》及其清洁发展机制的减排效应——基于中国参与全球环境治理微观项目数据的分析[J].经济研究,2019,54(03):55-71. [14]范子英,赵仁杰.法治强化能够促进污染治理吗?——来自环保法庭设立的证据[J].经济研究,2019,54(03):21-37. [15]夏怡然,陆铭.跨越世纪的城市人力资本足迹——历史遗产、政策冲击和劳动力流动[J].经济研究,2019,54(01):132-149. [16]毛其淋.人力资本推动中国加工贸易升级了吗?[J].经济研究,2019,54(01):52-67. [17]齐绍洲,林屾,崔静波.环境权益交易市场能否诱发绿色创新?——基于我国上市公司绿色专利数据的证据[J].经济研究,2018,53(12):129-143. [18]李明,李德刚,冯强.中国减税的经济效应评估——基于所得税分享改革“准自然试验”[J].经济研究,2018,53(07):121-135. [19]陈德球,陈运森.政策不确定性与上市公司盈余管理[J].经济研究,2018,53(06):97-111. [20]杜鹏程,徐舒,吴明琴.劳动保护与农民工福利改善——基于新《劳动合同法》的视角[J].经济研究,2018,53(03):64-78. [21]许和连,王海成.简政放权改革会改善企业出口绩效吗?——基于出口退(免)税审批权下放的准自然试验[J].经济研究,2018,53(03):157-170. [22]苏冬蔚,倪博.转融券制度、卖空约束与股价变动[J].经济研究,2018,53(03):110-125. [23]毕青苗,陈希路,徐现祥,李书娟.行政审批改革与企业进入[J].经济研究,2018,53(02):140-155. [24]李艳,杨汝岱.地方国企依赖、资源配置效率改善与供给侧改革[J].经济研究,2018,53(02):80-94. [25]陈林.自然垄断与混合所有制改革——基于自然实验与成本函数的分析[J].经济研究,2018,53(01):81-96. [26]赵西亮.教育、户籍转换与城乡教育收益率差异[J].经济研究,2017,52(12):164-178. [27]陆蓉,何婧,崔晓蕾.资本市场错误定价与产业结构调整[J].经济研究,2017,52(11):104-118. [28]*生,李好,马伟力,林秉旋.融资融券交易的信息治理效应[J].经济研究,2017,52(11):150-164. [29]钱雪松,方胜.担保物权制度改革影响了民营企业负债融资吗?——来自中国《物权法》自然实验的经验证据[J].经济研究,2017,52(05):146-160. [30]王朝阳,王振霞.涨跌停、融资融券与股价波动率——基于AH股的比较研究[J].经济研究,2017,52(04):151-165. [31]范子英,彭飞.“营改增”的减税效应和分工效应:基于产业互联的视角[J].经济研究,2017,52(02):82-95. [32]马述忠,张洪胜.集群商业信用与企业出口——对中国出口扩张奇迹的一种解释[J].经济研究,2017,52(01):13-27. [33]余明桂,钟慧洁,范蕊.业绩考核制度可以促进央企创新吗?[J].经济研究,2016,51(12):104-117. [34]林卉,许尤洋,刘峰.中国资本市场“框架效应”现象的实证研究——基于中组部18号文的自然实验[J].经济研究,2016,51(12):161-175. [35]刘啟仁,黄建忠.人民币汇率、依市场定价与资源配置效率[J].经济研究,2016,51(12):18-31. [36]叶青,赵良玉,刘思辰.独立董事“政商旋转门”之考察:一项基于自然实验的研究[J].经济研究,2016,51(06):98-113. [37]范子英,彭飞,刘冲.政治关联与经济增长——基于卫星灯光数据的研究[J].经济研究,2016,51(01):114-126. [38]毛其淋,许家云.中间品贸易*化与制造业就业变动——来自中国加入WTO的微观证据[J].经济研究,2016,51(01):69-83. [39]赵绍阳,臧文斌,尹庆双.医疗保障水平的福利效果[J].经济研究,2015,50(08):130-145. [40]*生,陈晨,林秉旋.卖空机制提高了中国股票市场的定价效率吗?——基于自然实验的证据[J].经济研究,2015,50(04):165-177. [41]李科,徐龙炳,朱伟骅.卖空限制与股票错误定价——融资融券制度的证据[J].经济研究,2014,49(10):165-178. [42]简泽,张涛,伏玉林.进口*化、竞争与本土企业的全要素生产率——基于中国加入WTO的一个自然实验[J].经济研究,2014,49(08):120-132. [43]范子英,李欣.部长的政治关联效应与财政转移支付分配[J].经济研究,2014,49(06):129-141. [44]陈刚,李树.司法独立与市场分割——以法官异地交流为实验的研究[J].经济研究,2013,48(09):30-42+70. [45]范子英,田彬彬.税收竞争、税收执法与企业避税[J].经济研究,2013,48(09):99-111. [46]简泽,干春晖,余典范.银行部门的市场化、信贷配置与工业重构[J].经济研究,2013,48(05):112-127. [47]李树,陈刚.环境管制与生产率增长——以APPCL2000的修订为例[J].经济研究,2013,48(01):17-31. [48]马双,张劼,朱喜.最低工资对中国就业和工资水平的影响[J].经济研究,2012,47(05):132-146. [49]白重恩,李宏彬,吴斌珍.医疗保险与消费:来自新型农村合作医疗的证据[J].经济研究,2012,47(02):41-53. [50]叶光亮,邓国营,黎志刚.个人住房贷款行为与房贷调控的有效性分析[J].经济研究,2011,46(S1):105-115. 经济学季刊 [1]王剑程,李丁,马双.宽带建设对农户创业的影响研究——基于“宽带乡村”建设的准自然实验[J].经济学(季刊),2020,19(01):209-232. [2]李仲飞,于守金,曹夏平.产业信贷政策对于房地产企业债务的影响——基于银行业359号“限贷”文件的准自然实验分析[J].经济学(季刊),2019,18(04):1373-1396. [3]吕铁,王海成.放松银行准入管制与企业创新——来自股份制商业银行在县域设立分支机构的准自然试验[J].经济学(季刊),2019,18(04):1443-1464. [4]陈晓红,朱蕾,汪阳洁.驻地效应——来自国家土地督察的经验证据[J].经济学(季刊),2019,18(01):99-122. [5]刘行,叶康涛,陆正飞.加速折旧政策与企业投资——基于“准自然实验”的经验证据[J].经济学(季刊),2019,18(01):213-234. [6]毛其淋,许家云.外资进入如何影响了本土企业出口国内附加值?[J].经济学(季刊),2018,17(04):1453-1488. [7]王智波,韩希.废止收容遣送制度的经济影响——基于检验最优城市理论的实证研究[J].经济学(季刊),2018,17(03):1013-1034. [8]卢盛峰,吴一平,谢潇.历史名片的经济价值——来自中国城市更名的证据[J].经济学(季刊),2018,17(03):1055-1078. [9]郭峰,熊瑞祥.地方金融机构与地区经济增长——来自城商行设立的准自然实验[J].经济学(季刊),2018,17(01):221-246. [10]*,李培鑫,李丽霞.*合作、市场整合与城市群经济绩效——基于长三角城市经济协调会的实证检验[J].经济学(季刊),2017,16(04):1563-1582. [11]边文龙,王向楠,李冉.保险费率市场化效果的解释和评估[J].经济学(季刊),2017,16(04):1477-1498. [12]刘怡,耿纯,赵仲匡.出口退税*间分担对产品出口的影响[J].经济学(季刊),2017,16(03):1011-1030. [13]倪骁然,朱玉杰.卖空压力影响企业的风险行为吗?——来自A股市场的经验证据[J].经济学(季刊),2017,16(03):1173-1198. [14]毛其淋,许家云.中间品贸易*化提高了企业加成率吗?——来自中国的证据[J].经济学(季刊),2017,16(02):485-524. [15]刘瑞明,赵仁杰.匿名审稿制度推动了中国的经济学进步吗?——基于双重差分方法的研究[J].经济学(季刊),2017,16(01):173-204. [16]范子英,田彬彬.政企合谋与企业逃税:来自国税局长异地交流的证据[J].经济学(季刊),2016,15(04):1303-1328. [17]丘心颖,郑小翠,邓可斌.分析师能有效发挥专业解读信息的作用吗?——基于汉字年报复杂性指标的研究[J].经济学(季刊),2016,15(04):1483-1506. [18]马榕,石晓军.中国债券信用评级结果具有甄别能力吗?——基于盈余管理敏感性的视角[J].经济学(季刊),2016,15(01):197-216. [19]李楠,林矗.太平天国战争对近代人口影响的再估计——基于历史自然实验的实证分析[J].经济学(季刊),2015,14(04):1325-1346. [20]管汉晖,陈博凯.货币的非国家化:汉代中国的经历(前175—前144年)[J].经济学(季刊),2015,14(04):1497-1518. [21]陈思霞,卢盛峰.分权增加了民生性财政支出吗?——来自中国“省直管县”的自然实验[J].经济学(季刊),2014,13(04):1261-1282. [22]马双,孟宪芮,甘犁.养老保险企业缴费对员工工资、就业的影响分析[J].经济学(季刊),2014,13(03):969-1000. [23]马双,甘犁.最低工资对企业在职培训的影响分析[J].经济学(季刊),2014,13(01):1-26. [24]何浩然.公共政策的效果能否被准确预测?来自中国塑料袋使用限制政策的自然实验证据[J].经济学(季刊),2012,11(04):1305-1322. [25]雷晓燕.管理医疗模式的影响差异——来自加州医疗救助的经验证据[J].经济学(季刊),2010,9(01):333-348. 管理世界 [1]李永友,王超.集权式财政改革能够缩小城乡差距吗?——基于“乡财县管”准自然实验的证据[J].管理世界,2020,36(04):113-130. [2]肖静华,胡杨颂,吴瑶.成长品:数据驱动的企业与用户互动创新案例研究[J].管理世界,2020,36(03):183-205. [3]贾建民,耿维,徐戈,郝辽钢,贾轼.大数据行为研究趋势:一个“时空关”的视角[J].管理世界,2020,36(02):106-116+211-212. [4]黄俊威,龚光明.融资融券制度与公司资本结构动态调整——基于“准自然实验”的经验证据[J].管理世界,2019,35(10):64-81. [5]陈林,万攀兵,许莹盈.混合所有制企业的股权结构与创新行为——基于自然实验与断点回归的实证检验[J].管理世界,2019,35(10):186-205. [6]刘冲,刘晨冉,孙腾.交通基础设施、金融约束与县域产业发展——基于“国道主干线系统”自然实验的证据[J].管理世界,2019,35(07):78-88+203. [7]周茂,李雨浓,姚星,陆毅.人力资本扩张与中国城市制造业出口升级:来自高校扩招的证据[J].管理世界,2019,35(05):64-77+198-199. [8]陈胜蓝,马慧.贷款可获得性与公司商业信用——中国利率市场化改革的准自然实验证据[J].管理世界,2018,34(11):108-120+149. [9]毛其淋,许家云.贸易政策不确定性与企业储蓄行为——基于中国加入WTO的准自然实验[J].管理世界,2018,34(05):10-27+62+179. [10]赵静,*昌,刘峰.高铁开通与股价崩盘风险[J].管理世界,2018,34(01):157-168+192. [11]钟覃琳,陆正飞.资本市场开放能提高股价信息含量吗?——基于“沪港通”效应的实证检验[J].管理世界,2018,34(01):169-179. [12]叶菁菁,吴燕,陈方豪,王宇晴.个人所得税减免会增加劳动供给吗?——来自准自然实验的证据[J].管理世界,2017(12):20-32+187. [13]谢贞发,严瑾,李培.中国式“压力型”财政激励的财源增长效应——基于取消农业税改革的实证研究[J].管理世界,2017(12):46-60+187-188. [14]刘行,赵健宇,叶康涛.企业避税、债务融资与债务融资来源——基于所得税征管*改革的断点回归分析[J].管理世界,2017(10):113-129. [15]李超,李涵.空气污染对企业库存的影响——基于我国制造业企业数据的实证研究[J].管理世界,2017(08):95-105. [16]李文贵,余明桂,钟慧洁.央企董事会试点、国有上市公司代理成本与企业绩效[J].管理世界,2017(08):123-135+153. [17]陈胜蓝,马慧.卖空压力与公司并购——来自卖空管制放松的准自然实验证据[J].管理世界,2017(07):142-156. [18]申广军,邹静娴.企业规模、政企关系与实际税率——来自世界银行“投资环境调查”的证据[J].管理世界,2017(06):23-36. [19]卢盛峰,陈思霞.*偏袒缓解了企业融资约束吗?——来自中国的准自然实验[J].管理世界,2017(05):51-65+187-188. [20]顾乃康,周艳利.卖空的事前威慑、公司治理与企业融资行为——基于融资融券制度的准自然实验检验[J].管理世界,2017(02):120-134. [21]权小锋,尹洪英.中国式卖空机制与公司创新——基于融资融券分步扩容的自然实验[J].管理世界,2017(01):128-144+187-188. [22]倪骁然,朱玉杰.劳动保护、劳动密集度与企业创新——来自2008年《劳动合同法》实施的证据[J].管理世界,2016(07):154-167. [23]许伟,陈斌开.税收激励和企业投资——基于2004~2009年增值税转型的自然实验[J].管理世界,2016(05):9-17. [24]范子英,刘甲炎.为买房而储蓄——兼论房产税改革的收入分配效应[J].管理世界,2015(05):18-27+187. [25]李涵,唐丽淼.交通基础设施投资、空间溢出效应与企业库存[J].管理世界,2015(04):126-136. [26]贾俊雪,宁静.纵向财政治理结构与地方*职能优化——基于省直管县财政*改革的拟自然实验分析[J].管理世界,2015(01):7-17+187. [27]余淼杰,梁中华.贸易*化与中国劳动收入份额——基于制造业贸易企业数据的实证分析[J].管理世界,2014(07):22-31. [28]刘行,叶康涛.金融发展、产权与企业税负[J].管理世界,2014(03):41-52. [29]李泽广,马泽昊.契约环境、代理成本与企业投资—债务期限关系[J].管理世界,2013(08):183-185. [30]叶青,李增泉,李光青.富豪榜会影响企业会计信息质量吗?——基于政治成本视角的考察[J].管理世界,2012(01):104-120. [31]郑新业,王晗,赵益卓.“省直管县”能促进经济增长吗?——双重差分方法[J].管理世界,2011(08):34-44+65. [32]王贤彬,聂海峰.行政区划调整与经济增长[J].管理世界,2010(04):42-53. [33]贾明,张喆.高管的政治关联影响公司慈善行为吗?[J].管理世界,2010(04):99-113+187. [34]聂辉华,方明月,李涛.增值税转型对企业行为和绩效的影响——以东北地区为例[J].管理世界,2009(05):17-24+35. [35]攀登,施东晖,宋铮.证券市场泡沫的生成机理分析——基于宝钢权证自然实验的实证研究[J].管理世界,2008(04):15-23+186. 世界经济 [1]吉赟,杨青.高铁开通能否促进企业创新:基于准自然实验的研究[J].世界经济,2020,43(02):147-166. [2]毛其淋,方森辉.外资进入*化如何影响中国制造业生产率[J].世界经济,2020,43(01):143-169. [3]刘灿雷,王永进.出口扩张与企业间工资差距:影响与机制[J].世界经济,2019,42(12):99-120. [4]林志帆,龙晓旋.卖空威胁能否激励中国企业创新[J].世界经济,2019,42(09):126-150. [5]李嘉楠,代谦,庄嘉霖.开放、市场整合与经济空间变迁:基于近代中国开埠的证据[J].世界经济,2019,42(09):27-51. [6]李磊,王小霞,蒋殿春,方森辉.中国最低工资上升是否导致了外资撤离[J].世界经济,2019,42(08):97-120. [7]郭俊杰,方颖,杨阳.排污费征收标准改革是否促进了中国工业二氧化硫减排[J].世界经济,2019,42(01):121-144. [8]蒋灵多,陆毅,陈勇兵.市场机制是否有利于僵尸企业处置:以外资管制放松为例[J].世界经济,2018,41(09):121-145. [9]施震凯,邵军,浦正宁.交通基础设施改善与生产率增长:来自铁路大提速的证据[J].世界经济,2018,41(06):127-151. [10]李胜旗,毛其淋.关税政策不确定性如何影响就业与工资[J].世界经济,2018,41(06):28-52. [11]曾建光,步丹璐,饶品贵.无偿划转、*补贴与社会福利[J].世界经济,2017,40(07):147-168. [12]马双,邱光前.最低工资对中国劳动密集型出口产品价格的影响[J].世界经济,2016,39(11):80-103. [13]周茂,陆毅,符大海.贸易*化与中国产业升级:事实与机制[J].世界经济,2016,39(10):78-102. [14]彭飞,范子英.税收优惠、捐赠成本与企业捐赠[J].世界经济,2016,39(07):144-167. [15]代谦,别朝霞.财政压力的经济后果:以宋朝的“靖康之变”为例[J].世界经济,2015,38(01):173-192. [16]戴觅,茅锐.外需冲击、企业出口与内销:金融危机时期的经验证据[J].世界经济,2015,38(01):81-104. [17]田巍,余淼杰.中间品贸易*化和企业研发:基于中国数据的经验分析[J].世界经济,2014,37(06):90-112. [18]刘甲炎,范子英.中国房产税试点的效果评估:基于合成控制法的研究[J].世界经济,2013,36(11):117-135. [19]王永进,盛丹.经济波动、劳动力市场摩擦与产业结构[J].世界经济,2013,36(04):22-46. [20]何浩然,陈叶烽.禀赋获得方式影响被试行为是否存在性别差异:来自自然现场实验的证据[J].世界经济,2012,35(04):102-117. [21]周浩,郑筱婷.交通基础设施质量与经济增长:来自中国铁路提速的证据[J].世界经济,2012,35(01):78-97. [22]冯皓,陆铭.通过买房而择校:教育影响房价的经验证据与政策含义[J].世界经济,2010,33(12):89-104. [23]曾海舰,苏冬蔚.信贷政策与公司资本结构[J].世界经济,2010,33(08):17-42. 金融研究 [1]吕朝凤,毛霞.地方金融发展能够影响FDI的区位选择吗?——一个基于城市商业银行设立的准自然实验[J].金融研究,2020(03):58-76. [2]许红梅,李春涛.劳动保护、社保压力与企业违约风险——基于《社会保险法》实施的研究[J].金融研究,2020(03):115-133. [3]胡珺,黄楠,沈洪涛.市场激励型环境规制可以推动企业技术创新吗?——基于中国碳排放权交易机制的自然实验[J].金融研究,2020(01):171-189. [4]诸竹君,黄先海,王煌.交通基础设施改善促进了企业创新吗?——基于高铁开通的准自然实验[J].金融研究,2019(11):153-169. [5]鲁元平,赵颖,石智雷.产假政策与子女长期人力资本积累[J].金融研究,2019(11):57-74. [6]刘杰,陈佳,刘力.投资者关注与市场反应——来自中国证券交易所交易公开信息的自然实验[J].金融研究,2019(11):189-206. [7]陈胜蓝,刘晓玲.中国城际高铁与商业信用供给——基于准自然实验的研究[J].金融研究,2019(10):117-134. [8]张*,王永进,李坤望.贸易*化对制造业企业现金储蓄的影响——预防性动机还是投资挤压?[J].金融研究,2019(09):19-38. [9]段白鸽,王永钦,夏梦嘉.金融创新如何缓解信任品市场失灵?——中国食品安全责任强制保险的自然实验[J].金融研究,2019(09):75-93. [10]陈运森,黄健峤.股票市场开放与企业投资效率——基于“沪港通”的准自然实验[J].金融研究,2019(08):151-170. [11]钱雪松,唐英伦,方胜.担保物权制度改革降低了企业债务融资成本吗?——来自中国《物权法》自然实验的经验证据[J].金融研究,2019(07):115-134. [12]卞元超,吴利华,白俊红.高铁开通是否促进了区域创新?[J].金融研究,2019(06):132-149. [13]杨筝,王红建,戴静,许传华.放松利率管制、利润率均等化与实体企业“脱实向虚”[J].金融研究,2019(06):20-38. [14]张鹏杨,徐佳君,刘会政.产业政策促进全球价值链升级的有效性研究——基于出口加工区的准自然实验[J].金融研究,2019(05):76-95. [15]杨青,吉赟,王亚男.高铁能提升分析师盈余预测的准确度吗?——来自上市公司的证据[J].金融研究,2019(03):168-188. [16]李建军,韩珣.普惠金融、收入分配和贫困减缓——推进效率和公平的政策框架选择[J].金融研究,2019(03):129-148. [17]李广众,贾凡胜.*财政激励、税收征管动机与企业盈余管理——以财政“省直管县”改革为自然实验的研究[J].金融研究,2019(02):78-97. [18]王永钦,徐鸿恂.杠杆率如何影响资产价格?——来自中国债券市场自然实验的证据[J].金融研究,2019(02):20-39. [19]毛其淋.外资进入*化如何影响了中国本土企业创新?[J].金融研究,2019(01):72-90. [20]苏冬蔚,连莉莉.绿色信贷是否影响重污染企业的投融资行为?[J].金融研究,2018(12):123-137. [21]郑志刚,刘思敏,黄继承.我国上市公司策略性股票更名:战略转型还是高位*?[J].金融研究,2018(10):158-173. [22]陈康,刘琦.股价信息含量与投资-股价敏感性——基于融资融券的准自然实验[J].金融研究,2018(09):126-142. [23]朱莹,王健.市场约束能够降低地方债风险溢价吗?——来自城投债市场的证据[J].金融研究,2018(06):56-72. [24]王永钦,陈映辉,熊雅文.存款保险制度如何影响公众对不同银行的信心?——来自中国的证据[J].金融研究,2018(06):109-122. [25]王芳,陈硕,王瑾.农业税减免、农业发展与地方*行为——县级证据[J].金融研究,2018(04):104-120. [26]叶康涛,刘芳,李帆.股指成份股调整与股价崩盘风险:基于一项准自然实验的证据[J].金融研究,2018(03):172-189. [27]王红建,杨筝,阮刚铭,曹瑜强.放松利率管制、过度负债与债务期限结构[J].金融研究,2018(02):100-117. [28]姜军,申丹琳,江轩宇,伊志宏.债权人保护与企业创新[J].金融研究,2017(11):128-142. [29]王攀娜,罗宏.放松卖空管制对分析师预测行为的影响——来自中国准自然实验的证据[J].金融研究,2017(11):191-206. [30]李春涛,刘贝贝,周鹏.卖空与信息披露:融券准自然实验的证据[J].金融研究,2017(09):130-145. [31]胡婷,惠凯,彭红枫.异常波动停牌对股价波动性和流动性的影响研究——来自我国取消异常波动停牌的自然实验[J].金融研究,2017(09):146-160. [32]杨晓兰,金雪军.我国股票市场熔断机制的磁力效应:基于自然实验的证据[J].金融研究,2017(09):161-177. [33]曹春方,陈露兰,张婷婷.“法律的名义”:司法独立性提升与公司违规[J].金融研究,2017(05):191-206. [34]杨筝,刘放,李茫茫.利率市场化、非效率投资与资本配置——基于中国人民银行取消贷款利率上下限的自然实验[J].金融研究,2017(05):81-96. [35]王兵,戴敏,武文杰.环保基地政策提高了企业环境绩效吗?——来自东莞市企业微观面板数据的证据[J].金融研究,2017(04):143-160. [36]冯根福,刘虹,冯照桢,温军.股票流动性会促进我国企业技术创新吗?[J].金融研究,2017(03):192-206. [37]侯青川,靳庆鲁,刘阳.放松卖空管制与公司现金价值——基于中国资本市场的准自然实验[J].金融研究,2016(11):112-127. [38]张三峰,张伟.融资约束、金融发展与企业雇佣——来自中国企业调查数据的经验证据[J].金融研究,2016(10):111-126. [39]王茂斌,孔东民.反腐败与中国公司治理优化:一个准自然实验[J].金融研究,2016(08):159-174. [40]卢盛峰,陈思霞.政策偏袒的经济收益:来自中国工业企业出口的证据[J].金融研究,2016(07):33-47. [41]张龙耀,杨骏,程恩江.融资杠杆监管与小额贷款公司“覆盖率-可持续性”权衡——基于分层监管的准自然实验[J].金融研究,2016(06):142-158. [42]陈海强,韩乾,吴锴.融资约束抑制技术效率提升吗?——基于制造业微观数据的实证研究[J].金融研究,2015(10):148-162. [43]*生,杜爽,林秉旋.卖空交易与股票价格稳定性——来自中国融资融券市场的自然实验[J].金融研究,2015(06):173-188. [44]汪小圈,张红,刘冲.幼年饥荒经历对个人自雇选择的影响[J].金融研究,2015(05):18-33. [45]曾建光,伍利娜,王立彦,諶家蘭.技术进步、信息透明度与开放式基金的资金流量——基于中国开放式基金强制采用XBRL的证据[J].金融研究,2014(08):131-145. [46]马光荣,刘明,杨恩艳.银行授信、信贷紧缩与企业研发[J].金融研究,2014(07):76-93. [47]梁中华,余淼杰.人民币升值与中国出口企业盈利能力——基于面板数据的实证分析[J].金融研究,2014(07):1-15. [48]简泽.银行债权治理、管理者偏好与国有企业的绩效[J].金融研究,2013(01):135-148. [49]余静文.信贷约束、股利分红与企业预防性储蓄动机——来自中国A股上市公司的证据[J].金融研究,2012(10):97-110. 统计研究 [1]王亚飞,廖甍,王亚菲.高铁开通促进了农业全要素生产率增长吗?——来自长三角地区准自然实验的经验证据[J].统计研究,2020,37(05):40-53. [2]胡宗义,李毅.环境信息披露的污染减排效应评估[J].统计研究,2020,37(04):59-74. [3]严文龙,陈宋生,田至立.审计定价管制与交易剩余——2010年审计定价管制失效的自然实验[J/OL].统计研究:1-11[2020-06-05].http://kns.cnki.net/kcms/detail/11.1302.C.20200325.1534.002.html. [4]王立勇,许明.中国精准扶贫政策的减贫效应研究:来自准自然实验的经验证据[J].统计研究,2019,36(12):15-26. [5]许家云.互联网如何影响工业结构升级?——基于互联网商用的自然实验[J].统计研究,2019,36(12):55-67. [6]邹伟,梁平汉.腾飞的翅膀:机场属地化改革与企业库存[J].统计研究,2019,36(11):76-89. [7]徐超,庞保庆,张充.降低实体税负能否遏制制造业企业“脱实向虚”[J].统计研究,2019,36(06):42-53. [8]卢盛峰,陈思霞,张东杰.*推动型城市化促进了县域经济发展吗[J].统计研究,2017,34(05):59-68. [9]许坤,苏扬.逆周期资本监管、监管压力与银行信贷研究[J].统计研究,2016,33(03):97-105. 中国工业经济 [1]谭小芬,钱佳琪.资本市场压力与企业策略性专利行为:卖空机制的视角[J].中国工业经济,2020(05):156-173. [2]于新亮,上官熠文,于文广,李倩.养老保险缴费率、资本——技能互补与企业全要素生产率[J].中国工业经济,2019(12):96-114. [3]饶品贵,王得力,李晓溪.高铁开通与供应商分布决策[J].中国工业经济,2019(10):137-154. [4]王雄元,卜落凡.国际出口贸易与企业创新——基于“中欧班列”开通的准自然实验研究[J].中国工业经济,2019(10):80-98. [5]黄溶冰,赵谦,王丽艳.自然资源资产离任审计与空气污染防治:“和谐锦标赛”还是“环保资格赛”[J].中国工业经济,2019(10):23-41. [6]张国建,佟孟华,李慧,陈飞.扶贫改革试验区的经济增长效应及政策有效性评估[J].中国工业经济,2019(08):136-154. [7]孟庆斌,李昕宇,张修平.卖空机制、资本市场压力与公司战略选择[J].中国工业经济,2019(08):155-173. [8]徐思,何晓怡,钟凯.“一带一路”倡议与中国企业融资约束[J].中国工业经济,2019(07):155-173. [9]任胜钢,郑晶晶,刘东华,陈晓红.排污权交易机制是否提高了企业全要素生产率——来自中国上市公司的证据[J].中国工业经济,2019(05):5-23. [10]宋贺,段军山.财务顾问与企业并购绩效[J].中国工业经济,2019(05):155-173. [11]史贝贝,冯晨,康蓉.环境信息披露与外商直接投资结构优化[J].中国工业经济,2019(04):98-116. [12]王桂军,卢潇潇.“一带一路”倡议与中国企业升级[J].中国工业经济,2019(03):43-61. [13]魏悦羚,张洪胜.进口*化会提升中国出口国内增加值率吗——基于总出口核算框架的重新估计[J].中国工业经济,2019(03):24-42. [14]孙雪娇,翟淑萍,于苏.柔性税收征管能否缓解企业融资约束——来自纳税信用评级披露自然实验的证据[J].中国工业经济,2019(03):81-99. [15]吴晓晖,郭晓冬,乔政.机构投资者抱团与股价崩盘风险[J].中国工业经济,2019(02):117-135. [16]贾俊雪,李紫霄,秦聪.社会保障与经济增长:基于拟自然实验的分析[J].中国工业经济,2018(11):42-60. [17]刘友金,曾小明.房产税对产业转移的影响:来自重庆和上海的经验证据[J].中国工业经济,2018(11):98-116. [18]蒋灵多,陆毅.市场竞争加剧是否助推国有企业加杠杆[J].中国工业经济,2018(11):155-173. [19]钱雪松,康瑾,唐英伦,曹夏平.产业政策、资本配置效率与企业全要素生产率——基于中国2009年十大产业振兴规划自然实验的经验研究[J].中国工业经济,2018(08):42-59. [20]诸竹君,黄先海,余骁.进口中间品质量、自主创新与企业出口国内增加值率[J].中国工业经济,2018(08):116-134. [21]李蕾蕾,盛丹.地方环境立法与中国制造业的行业资源配置效率优化[J].中国工业经济,2018(07):136-154. [22]李贲,吴利华.开发区设立与企业成长:异质性与机制研究[J].中国工业经济,2018(04):79-97. [23]龙小宁,林菡馨.专利执行保险的创新激励效应[J].中国工业经济,2018(03):116-135. [24]周茂,陆毅,杜艳,姚星.开发区设立与地区制造业升级[J].中国工业经济,2018(03):62-79. [25]余静文.企业国有化中的*角色[J].中国工业经济,2018(03):155-173. [26]刘瑞明,李林,亢延锟,赵勇.景点评选、*公共服务供给与地区旅游经济发展[J].中国工业经济,2018(02):118-136. [27]王永进,冯笑.行政审批制度改革与企业创新[J].中国工业经济,2018(02):24-42. [28]史贝贝,冯晨,张妍,杨菲.环境规制红利的边际递增效应[J].中国工业经济,2017(12):40-58. [29]蒋灵多,陆毅.最低工资标准能否抑制新僵尸企业的形成[J].中国工业经济,2017(11):118-136. [30]张小茜,孙璐佳.抵押品清单扩大、过度杠杆化与企业破产风险——动产抵押法律改革的“双刃剑”效应[J].中国工业经济,2017(07):175-192. [31]龙小宁,万威.环境规制、企业利润率与合规成本规模异质性[J].中国工业经济,2017(06):155-174. [32]简泽,谭利萍,吕大国,符通.市场竞争的创造性、破坏性与技术升级[J].中国工业经济,2017(05):16-34. [33]王兵,聂欣.产业集聚与环境治理:助力还是阻力——来自开发区设立准自然实验的证据[J].中国工业经济,2016(12):75-89. [34]林乐,郑登津.退市监管与股价崩盘风险[J].中国工业经济,2016(12):58-74. [35]何靖.延付高管薪酬对银行风险承担的政策效应——基于银行盈余管理动机视角的PSM-DID分析[J].中国工业经济,2016(11):126-143. [36]龙小宁,张训常,杨进.转轨背景下官员兼职规制的经济效应[J].中国工业经济,2016(07):40-56. [37]罗知,赵奇伟,严兵.约束机制和激励机制对国有企业长期投资的影响[J].中国工业经济,2015(10):69-84. [38]赵晶,张书博,祝丽敏.传承人合法性对家族企业战略变革的影响[J].中国工业经济,2015(08):130-144. [39]吴海民,吴淑娟,陈辉.城市文明、交易成本与企业“第四利润源”——基于全国文明城市与民营上市公司核匹配倍差法的证据[J].中国工业经济,2015(07):114-129. [40]范子英.土地财政的根源:财政压力还是投资冲动[J].中国工业经济,2015(06):18-31. [41]韩超,胡浩然.清洁生产标准规制如何动态影响全要素生产率——剔除其他政策干扰的准自然实验分析[J].中国工业经济,2015(05):70-82. [42]唐明哲,刘丰波,林平.价格检验在相关市场界定中的实证运用——对茅台、五粮液垄断案的再思考[J].中国工业经济,2015(04):135-148. 会计研究 [1]朱焱,王玉丹.卖空机制与企业社会责任承担——基于中国融资融券制度的准自然实验研究[J].会计研究,2019(12):58-64. [2]刘行,赵健宇.税收激励与企业创新——基于增值税转型改革的“准自然实验”[J].会计研究,2019(09):43-49. [3]崔学刚,邓衢,邝文俊.卖空交易、市场行情与股价崩盘风险[J].会计研究,2019(06):43-50. [4]张金丹,路军,李连华.审计报告中披露关键审计事项信息有助于提高审计质量吗?——报表盈余和市场感知双维度的经验证据[J].会计研究,2019(06):85-91. [5]陈运森,黄健峤,韩慧云.股票市场开放提高现金股利水平了吗?——基于“沪港通”的准自然实验[J].会计研究,2019(03):55-62. [6]钱雪松,代禹斌,陈琳琳,方胜.担保物权制度改革、融资约束与企业现金持有——基于中国《物权法》自然实验的经验证据[J].会计研究,2019(01):72-78. [7]王仲兵,王攀娜.放松卖空管制与企业投资效率——来自中国资本市场的经验证据[J].会计研究,2018(09):80-87. [8]郝颖,谢光华,石锐.外部监管、在职消费与企业绩效[J].会计研究,2018(08):42-48. [9]吴战篪,陈相伊,吴伟立.融资融券制度与资产增长效应[J].会计研究,2017(06):89-95+97. [10]李丹,袁淳,廖冠民.卖空机制与分析师乐观性偏差——基于双重差分模型的检验[J].会计研究,2016(09):25-31. [11]刘运国,刘梦宁.雾霾影响了重污染企业的盈余管理吗?——基于政治成本假说的考察[J].会计研究,2015(03):26-33+94. [12]王春飞,陆正飞.事务所“改制”、保险价值与投资者保护[J].会计研究,2014(05):81-87+95. [13]陈运森,郑登津,李路.民营企业发审委社会关系、IPO资格与上市后表现[J].会计研究,2014(02):12-19+94. [14]曾建光,伍利娜,谌家兰,王立彦.XBRL、代理成本与绩效水平——基于中国开放式基金市场的证据[J].会计研究,2013(11):88-94+96. 世界经济文汇 [1]蓝嘉俊,方颖,魏下海.性别比失衡下的婚姻匹配与劳动力市场表现——基于独生子女政策准自然实验的实证分析[J].世界经济文汇,2019(04):67-84. [2]赵琳,唐珏,陈诗一.环保管理*垂直化改革的环境治理效应[J].世界经济文汇,2019(02):100-120. [3]周梦天,王之.空气质量信息公开会影响城市房价吗?——基于我国各城市公开PM2.5监测数据的自然实验[J].世界经济文汇,2018(03):20-42. [4]傅家范,刘冲.*注资、存款优势与国有银行反危机信贷投放[J].世界经济文汇,2017(05):75-90. [5]刘金山,*.对口支援政策有效吗?——来自19省市对口援疆自然实验的证据[J].世界经济文汇,2017(04):43-61. [6]陈怡安.父母政治身份、职位背景与子女创业[J].世界经济文汇,2017(01):26-50. [7]范子英.为买房而离婚——基于住房限购政策的研究[J].世界经济文汇,2016(04):1-17. 中国人口、资源与环境 [1]王为东,王冬,卢娜.中国碳排放权交易促进低碳技术创新机制的研究[J].中国人口·资源与环境,2020,30(02):41-48. [2]胡江峰,黄庆华,潘欣欣.碳排放交易制度与企业创新质量:抑制还是促进[J].中国人口·资源与环境,2020,30(02):49-59. [3]张晖,吴霜,张燕媛,虞祎.流域生态补偿政策对受偿地区经济增长的影响研究——以安徽省黄山市为例[J].长江流域资源与环境,2019,28(12):2848-2856. [4]刘常建,许为宾,蔡兰,张孝静.环保压力与重污染企业的银行贷款契约——基于“PM_(2.5)爆表”事件的经验证据[J].中国人口·资源与环境,2019,29(12):121-130. [5]龚梦琪,刘海云,姜旭.中国低碳试点政策对外商直接投资的影响研究[J].中国人口·资源与环境,2019,29(06):50-57. [6]尤济红,陈喜强.区域一体化合作是否导致污染转移——来自长三角城市群扩容的证据[J].中国人口·资源与环境,2019,29(06):118-129. [7]翟华云,刘亚伟.环境司法专门化促进了企业环境治理吗?——来自专门环境法庭设置的准自然实验[J].中国人口·资源与环境,2019,29(06):138-147. [8]张楠,卢洪友,黄健.资源枯竭城市转移支付对经济增长的影响[J].中国人口·资源与环境,2019,29(04):147-156. [9]赵领娣,徐乐.基于长三角扩容准自然实验的区域一体化水污染效应研究[J].中国人口·资源与环境,2019,29(03):50-61. [10]温湖炜,周凤秀.环境规制与中国省域绿色全要素生产率——兼论对《环境保护税法》实施的启示[J].干旱区资源与环境,2019,33(02):9-15. [11]景守武,张捷.新安江流域横向生态补偿降低水污染强度了吗?[J].中国人口·资源与环境,2018,28(10):152-159. [12]黄志平.碳排放权交易有利于碳减排吗?——基于双重差分法的研究[J].干旱区资源与环境,2018,32(09):32-36. [13]雷平,曹黎明,赵连荣.乡土官员对区域经济与环境发展路径的影响[J].中国人口·资源与环境,2018,28(04):163-176. [14]何文剑,徐静文,张红霄.森林采伐限额管理制度能否起到保护森林资源的作用[J].中国人口·资源与环境,2016,26(07):128-136. [15]何浩然,陈安来.中国限制塑料袋使用的政策效果及国际经验借鉴[J].中国人口·资源与环境,2010,20(11):167-174. 中国农村经济 [1]罗斯炫,何可,张俊飚.增产加剧污染?——基于粮食主产区政策的经验研究[J].中国农村经济,2020(01):108-131. [2]丁从明,吴羽佳,秦姝媛,梁甄桥.社会信任与公共政策的实施效率——基于农村居民新农保参与的微观证据[J].中国农村经济,2019(05):109-123. [3]胡新艳,陈小知,米运生.农地整合确权政策对农业规模经营发展的影响评估——来自准自然实验的证据[J].中国农村经济,2018(12):83-102. [4]周振,张琛,彭超,孔祥智.农业机械化与农民收入:来自农机具购置补贴政策的证据[J].中国农村经济,2016(02):68-82. 国际贸易问题 [1]曾守桢,余官胜.行政审批简化与我国对外直接投资增长——基于核准权下放试点的准自然实验实证研究[J].国际贸易问题,2020(04):19-34. [2]刘冲,张辉,吴群锋.进口竞争与企业产品专业化——基于中国多产品企业的研究[J].国际贸易问题,2020(03):22-39. [3]高翔,袁凯华.清洁生产环境规制与企业出口技术复杂度——微观证据与影响机制[J].国际贸易问题,2020(02):93-109. [4]吴嵩博,崔凡.融资约束与中国企业出口市场偏好——基于开发区准自然实验的实证分析[J].国际贸易问题,2020(02):157-174. [5]杨珍增,杨宏.美国“301调查”征税清单调整的政治经济学分析[J].国际贸易问题,2020(01):82-93. [6]张彩云.科技标准型环境规制与企业出口动态——基于清洁生产标准的一次自然实验[J].国际贸易问题,2019(12):32-45. [7]王毅,黄先海,余骁.环境规制是否降低了中国企业出口国内附加值率[J].国际贸易问题,2019(10):117-131. [8]兰健,张洪胜.集群商业信用与出口产品质量——来自中国企业层面的证据[J].国际贸易问题,2019(09):12-25. [9]黄先海,王煌,陈航宇.人口集聚如何影响出口企业加成率:理论机制与经验证据[J].国际贸易问题,2019(07):1-18. [10]张鹏杨,李众宜,毛海涛.产业政策如何影响企业出口二元边际[J].国际贸易问题,2019(07):47-62. [11]孙林,胡玲菲,方巧云.中国*贸易区战略提升中国进口食品质量了吗——基于双重差分模型[J].国际贸易问题,2019(05):54-68. [12]胡浩然.产业政策如何影响出口企业绩效——基于出口加工区企业样本的准自然实验[J].国际贸易问题,2018(12):27-38. [13]章韬,戚人杰.集聚-出口双促进政策的溢出效应——来自出口加工区的微观企业证据[J].国际贸易问题,2017(03):26-38. [14]彭冬冬,杜运苏.中间品贸易*化、融资约束与贸易方式转型[J].国际贸易问题,2016(12):52-63. [15]杜艳,周茂,李雨浓.贸易*化能否提高中国制造业企业资源再配置效率——基于中国加入WTO的倍差法分析[J].国际贸易问题,2016(09):38-49. [16]项后军,何康.自贸区的影响与资本流动——以上海为例的自然实验研究[J].国际贸易问题,2016(08):3-15. [17]刘啟仁,黄建忠.贸易*化、企业动态与行业生产率变化——基于我国加入WTO的自然实验[J].国际贸易问题,2016(01):27-37. [18]申萌,曾燕萍,曲如晓.环境规制与企业出口:来自千家企业节能行动的微观证据[J].国际贸易问题,2015(08):43-50. 南开管理评论 [1]田利辉,王可第.腐败惩治的正外部性和企业创新行为[J].南开管理评论,2020,23(02):121-131+154. [2]胡宁,王雪方,孙莲珂,靳庆鲁.房产限购政策有助于实体企业“脱虚返实”吗——基于双重差分研究设计[J].南开管理评论,2019,22(04):20-31. [3]马惠娴,佟爱琴.卖空机制对高管薪酬契约的治理效应——来自融资融券制度的准自然实验[J].南开管理评论,2019,22(02):61-74. [4]何威风,陈莉萍,刘巍.业绩考核制度会影响企业盈余管理行为吗[J].南开管理评论,2019,22(01):17-30. [5]田轩,孟清扬.股权激励计划能促进企业创新吗[J].南开管理评论,2018,21(03):176-190. [6]陈怡欣,张俊瑞,汪方军.卖空机制对上市公司创新的影响研究——基于我国融资融券制度的自然实验[J].南开管理评论,2018,21(02):62-74. [7]黄俊,黄超,位豪强,王敏.卖空机制提高了分析师盈余预测质量吗——基于融资融券制度的经验证据[J].南开管理评论,2018,21(02):135-148. [8]孙光国,孙瑞琦.控股股东委派执行董事能否提升公司治理水平[J].南开管理评论,2018,21(01):88-98+108. [9]沈洪涛,周艳坤.环境执法监督与企业环境绩效:来自环保约谈的准自然实验证据[J].南开管理评论,2017,20(06):73-82. [10]李茫茫,黎文靖.审计具有保险功能吗——基于*官员变更的自然实验[J].南开管理评论,2017,20(04):93-104. [11]陈运森,郑登津.董事网络关系、信息桥与投资趋同[J].南开管理评论,2017,20(03):159-171. [12]贾凡胜,吴昱,廉柯赟.股利税差别化、现金分红与代理问题——基于财税[2012]85号文件的研究[J].南开管理评论,2016,19(01):142-154. [13]徐莉萍,辛宇.媒体治理与中小投资者保护[J].南开管理评论,2011,14(06):36-47+94. 管理科学学报 [1]李沁洋,许年行.资本市场对外开放与股价崩盘风险——来自沪港通的证据[J].管理科学学报,2019,22(08):108-126. [2]张岩,吴芳,吴晓晖.IPO募资双重管制与资源配置——基于自然实验的经验证据[J].管理科学学报,2018,21(11):76-91. [3]刘志红,王艺明.“省直管县”改革能否提升县级财力水平?[J].管理科学学报,2018,21(10):1-13. [4]陈胜蓝,卢锐.卖空压力与控股股东私利侵占——来自卖空管制放松的准自然实验证据[J].管理科学学报,2018,21(04):67-85. [5]金宇超,靳庆鲁,严青蕾.合谋与胁迫:作为经济主体的媒体行为——基于新闻敲诈曝光的事件研究[J].管理科学学报,2018,21(03):1-22. [6]才静涵,夏乐.卖空制度、流动性与信息不对称问题研究——香港市场的个案[J].管理科学学报,2011,14(02):71-85. [7]王志强,吴世农.我国股票市场透明度变革效应研究[J].管理科学学报,2008,11(05):110-119. 社会学研究 [1]哈巍,赵颖.教学相“涨”:高校学生成绩和评教分数双重膨胀研究[J].社会学研究,2019,34(01):84-105+243-244. [2]程诚.同伴社会资本与学业成就——基于随机分配自然实验的案例分析[J].社会学研究,2017,32(06):141-164+245. 中国的准自然实验真多!