How can I create a method that contains a dash in the name?
public void my-method-name()
{
}
How can I create a method that contains a dash in the name?
public void my-method-name()
{
}
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 -.