Your full service technology partner! 
-Collapse +Expand
Search C# Group:

-Collapse +Expand C# To/From
-Collapse +Expand C# Study Test
-Collapse +Expand C# Store

Prestwood eMagazine

May Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyC# (Visual C# & VS.Net) BoardC# & WinForms Topic     Print This   

Hungarian notation

Hungarian notation in C# & WinForms topic (part of our C# (Visual C# & VS.Net) group).

Quick Search: Hungarian   notation   Hungarian notation  

Donald Collins
I'm reading "Programming in C#" (O'Reilly) and the book states that Microsoft doesn't recommend using Hungarian notation for C#. Confused Can anyone explain why? Does Prestwood Software have a coding convention for C#? I'd be interested in seeing it.

Donald Collins
 Posted 14 years ago (Thread Starter)
Comment Quote
Location=Sacramento ,  Joined=14 years ago   MB Posts=4  
More... -Collapse +Expand
Donald Collins
Rank: Cadet 2nd Year
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.
Post ID #5349, 2 replies
Thread Started 2/19/2002 10:44:00 AM
View Counter=2174

Mike Prestwood
PCC C# is currently under development but no target completion date has been set. We are currently looking for contributers so if anyone is interested, let me know.

As for not using hungarian notation, I'm not sure but here are a couple of thoughts:

  • Hungarian notation is really a throw back to the old large structured programming techniqniques. It was an aid to identifying the type of both local and global variables.

  • In OO, you deal primarily with objects. Furthermore, when working with objects most do not use hungarian notation (too many objects).

  • I see nothing wrong with using hungarian notation for "true" local variables within a method. However, with today's promotion of divide and conquer you tend to write much smaller code routines so hungarian notation may be overkill.

Anyone else have any ideas?

Mike Prestwood
Prestwood IT Solutions

 Posted 14 years ago
Comment Quote
Location=Prestwood IT office in Citrus Heights, CA,  Joined=16 years ago   MB Posts=1404   KB Posts=1490  
More... -Collapse +Expand
Mike Prestwood
Prestwood IT
Prestwood IT office in Citrus Heights, CA
Rank: Fleet Admiral
Approved member.
Member subscribes to this thread with a verified email.
About Mike Prestwood

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Web Presence
Facebook, Prestwood IT Facebook page -- fan page. (Visit Me)
Twitter, Follow Prestwood IT on Twitter. (Visit Me)
LinkedIn, Prestwood IT company page on LinkedIn. (Visit Me)
YouTube, Prestwood IT YouTube Channel (Visit My Channel)
Website, My drum website where I sell my drum books. (

Post ID #5351 (Level 1.1)  Reply to 5349
Thread Started 2/19/2002 11:27:00 AM
View Counter=2
Most Recent Post

Scott Wehrly
Hungarian notation in code has always presented a readability issue. Yes, Microsoft was very gung-ho about Hungarian notation back in the era preceeding object oriented programming, but the change of heart really has to do more with standard practices of object oriented programming, rather than readability.

In C#, as with all current OO languages, the use of global variables is almost non-existent. Instead, you're dealing with objects that have states, and alter those states through messages.

To this end, you want the code to be more readable, not less. Even with method parameters, OO practices lean more toward discrete functions that affect fewer variables, not more, so the parameter lists are often brief and descriptive - and data types are most often inferred from the object a method belongs to.

Even in an application with a large number of data variables, in C#, you're going to be structuring those variables along class boundaries, and reference them through object ownership.

Now, keep in mind these are practices, not mandates. Microsoft isn't saying you can't use Hungarian notation, just that it is out of place in real OO development.
 Posted 14 years ago
Comment Quote
Location=Las Vegas, NV USA,  Joined=14 years ago   MB Posts=442   KB Posts=19  
More... -Collapse +Expand
Scott Wehrly
Prestwood IT
Las Vegas, NV USA
Rank: Commander
Inactive member.
Member does not subscribe to this thread.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.
Post ID #5352 (Level 1.2)  Reply to 5349
Reply Posted 2/19/2002 11:49:00 AM

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.

Anonymous Post:

Enter your name and security key.

Your Name:
Today's security key = P33A
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #5349 Counter
Since 4/2/2008
Have a question? Need our services? Contact us now.
--Mike Prestwood

Call: 916-726-5675


Connect With Us...
Join Us!
Like our page!!!
Follow us!
Join Group
View channel.
Go ahead!   Use Us! Call: 916-726-5675 

©1995-2016 Prestwood IT Solutions.   [Security & Privacy]   Made in the U.S.A..   No H1-B.   No offshoring.