c#编译器是可执行的吗?
有没有办法添加您自己的语言扩展 例如:c#编译器是可执行的吗?,c#,compiler-construction,C#,Compiler Construction,有没有办法添加您自己的语言扩展 例如: public string Foo { get; set; } 可编码为: public auto string Foo; 不,不能用这种方式扩展C#编译器 你应该感谢它这么短,你曾经不得不写: public string Foo { get { return this.foo; } set { this.foo = value; } } private string fo
public string Foo { get; set; }
可编码为:
public auto string Foo;
不,不能用这种方式扩展C#编译器 你应该感谢它这么短,你曾经不得不写:
public string Foo
{
get
{
return this.foo;
}
set
{
this.foo = value;
}
}
private string foo;
不,但你可以直接打字
prop
在VisualStudio中,按Tab键(可能两次),然后瞧!你得到了你想要的D