0
有什么方法可以添加自己的语言扩展?是c#编译器可执行文件吗?
例如使它这样:
public string Foo { get; set; }
可以被编码为:
public auto string Foo;
有什么方法可以添加自己的语言扩展?是c#编译器可执行文件吗?
例如使它这样:
public string Foo { get; set; }
可以被编码为:
public auto string Foo;
没有,但你可以在Visual Studio中键入
prop
,按Tab键(也许两次) ,瞧!你得到你想要的。 :D
都能跟得上 - 你不能用这种方式延长C#编译器。
你应该感谢它的短,你曾经有过这样写:
public string Foo
{
get
{
return this.foo;
}
set
{
this.foo = value;
}
}
private string foo;