Link Details

Link 95579 thumbnail
User 278445 avatar

By Shaharyr
via dev102.com
Published: Jul 17 2008 / 14:23

Yes, I will use m_ prefix for class members. I DO NOT NEGOTIATE WITH TERRORISTS. Shut up. Actually, I don’t mind which prefix shall be used but in order to make member variables distinct from local variables, we have to give it some prefix. This is a part of a coding convention for C++ adopted by Microsoft called Hungarian notation. Some of you may say that it may be a bit disturbing using C++ naming conventions in C# code, but...
  • 9
  • 6
  • 1186
  • 329

Comments

Add your comment
User 254602 avatar

Nick Brown replied ago:

1 votes Vote down Vote up Reply

As long as you are using a modern IDE which can differentiate between local variables and instance variables, this is a non-issue.

User 280487 avatar

galiel replied ago:

0 votes Vote down Vote up Reply

It is an issue because it doesn't solve all of the problems which were introduced.
And... VS alone doesn't differentiate between local variables and instance variables, you should use Resharper/Visual Assist ot something like that and those tools cost money!

User 254602 avatar

Nick Brown replied ago:

0 votes Vote down Vote up Reply

Eclipse does the job and does not cost a thing. Local variables show up in regular text while instance variables show up as blue and in italics. Exactly which problems is it not solving?

User 280487 avatar

galiel replied ago:

0 votes Vote down Vote up Reply

First of all, there are a LOT (I think most) of developers who doesn't use Eclipse, so it doesn't help them...
Besides using prefix helps you when you use intellisense...

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.