I’m creating a class. What’s the best practice for naming properties/methods when your preferred name is a reserved word?
I’m creating a class. What’s the best practice for naming properties/methods when your preferred
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I usually try to think of some synonymous alternative word, or variation, though it doesn’t sound like that is applicable for you.
Alternatively, you can use the ‘@’ prefix (in C#) or [square braces] (in VB.NET) to explicitly avoid the conflict with reserved words in the language.