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

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,173
Latest member
GeraldReund
Top