Results 1 to 3 of 3

Thread: [resolved] aaah another dumb question.... naming private vars

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Smile [resolved] aaah another dumb question.... naming private vars

    What's the correct way of naming private variables in a class?

    mVarName?
    myVarName?
    m_VarName?


    which one should I use? ( I know it doesnt make a big difference, but I'de like to know which is the most popular one anyways)
    Last edited by MrPolite; Jan 25th, 2003 at 03:30 PM.
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    It doesn't matter at all really. I think m_VarName stems from C/C++ where private variables are sometimes called member variables hence the m_. I liked that and used it in VB6 but now I meanly use just _ so it'd be _VarName. But really I think the only thing that matters is that you stick to a pattern so its easier to read your code. So no matter what you pick just ALWAYS use that and build consistantance.

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    Originally posted by Edneeis
    build consistantance.
    oooh that's a good one... I'm not consistant at all! thanks, I'll try
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width