Naming Conventions
-
Hi ppl. What sort of naming standards should you use for C#? Should variable names in the class start with "m_str" for example? thanks
-
Hi ppl. What sort of naming standards should you use for C#? Should variable names in the class start with "m_str" for example? thanks
Take also a look at this site[^] from MSDN. It should give you a general overview before studying the previous posted link. www.troschuetz.de
-
This is what microsoft dictates... Naming Guidelines[^] I think your sopposed to use pascal case for variables and no little prefix.... /\ |_ E X E GG
eggie5 wrote: This is what microsoft dictates Well, Microsoft don't really dictate it, they are called "guidelines" because you can ignore them if you wish. But, obviously if everyone follows the guidelines it becomes easier to maintain and read the code.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar The Second EuroCPian Event will be in Brussels on the 4th of September Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way! My Blog
-
eggie5 wrote: This is what microsoft dictates Well, Microsoft don't really dictate it, they are called "guidelines" because you can ignore them if you wish. But, obviously if everyone follows the guidelines it becomes easier to maintain and read the code.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar The Second EuroCPian Event will be in Brussels on the 4th of September Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way! My Blog
-
:laugh: Kind of... :-D
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar The Second EuroCPian Event will be in Brussels on the 4th of September Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way! My Blog
-
This is what microsoft dictates... Naming Guidelines[^] I think your sopposed to use pascal case for variables and no little prefix.... /\ |_ E X E GG
I notice there is no more use of the prefix for the type of the variable anymore. I'm use to using a variable named say "strName" to say the type is a string. Wouldn't the use of just "Name" be a little confusing if you didn't know its type just by looking naming standard for all you know it could be a integer, boolean (hopefully not!)?
-
I notice there is no more use of the prefix for the type of the variable anymore. I'm use to using a variable named say "strName" to say the type is a string. Wouldn't the use of just "Name" be a little confusing if you didn't know its type just by looking naming standard for all you know it could be a integer, boolean (hopefully not!)?
-
If you are using visual studio or any other ide, you can tell my just leaving your mouse over the variable and it will give you all that info... /\ |_ E X E GG