Which c# naming convention?

R

Rick

Hi,

I found these suggestions from Woody Pewitt on the net. Do you agree this is
a best practice?

Rick

BEGIN

- Hungarian notation is out!
- For public interfaces, use PascalCasing
- For private members, use camelCasing
- Use underscore "_" character to denote private class members
- Use camelCasing for all method parameters


public class Customer
{
private string _password;

public void SetPassword(string newPassword)
{
_password = newPassword;
}
}


END
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top