开发者

Method name containing a dash?

开发者 https://www.devze.com 2022-12-17 10:29 出处:网络
How c开发者_如何学运维an I create a method that contains a dash in the name? public void my-method-name()

How c开发者_如何学运维an I create a method that contains a dash in the name?

public void my-method-name()
{
}


You can't. Use ActionNameAttribute.


You cannot. It violate the identifier specification. But you can put other Unicode character set. e.g you can give a function name.

void 中國話 (int i){
}

in .NET and you can use _ underscore instead of -.

0

精彩评论

暂无评论...
验证码 换一张
取 消