Which c# naming convention?

Discussion in 'ASP .Net' started by Rick, Jan 19, 2004.

  1. Rick

    Rick Guest

    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
     
    Rick, Jan 19, 2004
    #1
    1. Advertising

  2. Rick

    Paul Glavich Guest

    This link on MSDN has a bunch of guidelines, including coding/naming
    guidelines from Microsoft.

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/ht
    ml/cpconnetframeworkdesignguidelines.asp

    --
    - Paul Glavich


    "Rick" <> wrote in message
    news:#...
    > 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
    >
    >
     
    Paul Glavich, Jan 19, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dm1608
    Replies:
    6
    Views:
    8,527
  2. Buck Turgidson

    JSP Method Naming Convention

    Buck Turgidson, Mar 2, 2004, in forum: Java
    Replies:
    1
    Views:
    1,756
    P.Hill
    Mar 2, 2004
  3. harry
    Replies:
    2
    Views:
    1,197
    harry
    Dec 8, 2004
  4. Roedy Green

    Naming Convention(s)

    Roedy Green, Sep 3, 2005, in forum: Java
    Replies:
    24
    Views:
    973
    Dale King
    Sep 12, 2005
  5. Unpredictable

    Variable naming convention

    Unpredictable, Jan 3, 2006, in forum: Java
    Replies:
    4
    Views:
    542
    Roedy Green
    Jan 3, 2006
Loading...

Share This Page