Results 1 to 3 of 3

Thread: Variable naming

  1. #1

    Thread Starter
    Fanatic Member BrianHawley's Avatar
    Join Date
    Aug 2001
    Location
    Saudi Arabia
    Posts
    796

    Question Variable naming

    Anybody got any information/opinions on variable naming in C#?

    Do we go Hungarian Notation or what?

    Is there any standard yet, or are people just going their own way?

    If there's a standard, then a link to a list would be appreciated.
    Brian
    (Fighting with the RightToLeft bugs in VS 2005)

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  3. #3

    Thread Starter
    Fanatic Member BrianHawley's Avatar
    Join Date
    Aug 2001
    Location
    Saudi Arabia
    Posts
    796
    Well.... yes. Interesting article, but it raises the same question that I'm raising. At least I can now see where the conflicting information comes from. Seems Microsoft changed their suggested standard in mid-release.

    At least Hungarian lets you know the type of variable from its name. I guess that's not essential if the complier throws an error to warn you if you have the wrong type, but our VB brothers will have to remember to turn on Option Strict, unless they will tolerate type conversions.

    Is type-conversion a bad thing? I know some purists consider it sloppy programming (yes, I'm one) - but can anybody think of a situation where it could lead to a real problem? Passing the wrong data type to an API maybe - but that's easily checked.
    Brian
    (Fighting with the RightToLeft bugs in VS 2005)

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