tags:

views:

106

answers:

2

How can I create a method that contains a dash in the name?

public void my-method-name()
{
}
+3  A: 

You can't. Use ActionNameAttribute.

Darin Dimitrov
+2  A: 

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 -.

affan