Use of @keyword in C# -- bad idea?
Posted
by Robert Fraser
on Stack Overflow
See other posts from Stack Overflow
or by Robert Fraser
Published on 2010-04-08T05:49:37Z
Indexed on
2010/04/08
5:53 UTC
Read the original article
Hit count: 429
In my naming convention, I use _name for private member variables. I noticed that if I auto-generate a constructor with ReSharper, if the member is a keyword, it will generate an escaped keyword. For example:
class IntrinsicFunctionCall
{
private Parameter[] _params;
public IntrinsicFunctionCall(Parameter[] @params)
{
_params = @params;
}
}
Is this generally considered bad practice or is it OK? It happens quite frequently with @params and @interface.
© Stack Overflow or respective owner