Naming Question
-
When naming variables, do you use "filename" or "fileName"? I find myself going back and forth, and can't get my mind to pick one and stick with it.
-
When naming variables, do you use "filename" or "fileName"? I find myself going back and forth, and can't get my mind to pick one and stick with it.
Use mixed case fileName, makes them much easier to read.
Jonathan Wilkes Darka[DebugSPY] [My Code Project Articles]
-
Use mixed case fileName, makes them much easier to read.
Jonathan Wilkes Darka[DebugSPY] [My Code Project Articles]
Actually, in this case I find filename easier to read than fileName.
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
When naming variables, do you use "filename" or "fileName"? I find myself going back and forth, and can't get my mind to pick one and stick with it.
I prefer
filename
. However, in public APIs, I name propertiesFileName
andUserName
in keeping with Microsoft's convention. /raviMy new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
When naming variables, do you use "filename" or "fileName"? I find myself going back and forth, and can't get my mind to pick one and stick with it.
Mostly
filename
But that's because I had to forcibly break myself of usingstrFilename
...Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
-
When naming variables, do you use "filename" or "fileName"? I find myself going back and forth, and can't get my mind to pick one and stick with it.
In this case,
path
. This is in keeping with Microsoft's convention for naming files.Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
I prefer
filename
. However, in public APIs, I name propertiesFileName
andUserName
in keeping with Microsoft's convention. /raviMy new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
In this case,
path
. This is in keeping with Microsoft's convention for naming files.Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
now do you use "filepath" or "filePath"? :confused:
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
-
Properties would start with a capital-letter, but a variable wouldn't :) Locals are usually Pascal-cased.
Bastard Programmer from Hell :suss:
Yes, I know. I was referring to the case of the letters within the identifier. I thought that was blindingly obvious. :) /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
Yes, I know. I was referring to the case of the letters within the identifier. I thought that was blindingly obvious. :) /ravi
My new year resolution: 2048 x 1536 Home | Articles | My .NET bits | Freeware ravib(at)ravib(dot)com
-
When naming variables, do you use "filename" or "fileName"? I find myself going back and forth, and can't get my mind to pick one and stick with it.
-
now do you use "filepath" or "filePath"? :confused:
Luc Pattyn [My Articles] Nil Volentibus Arduum
Fed up by FireFox memory leaks I switched to Opera and now CP doesn't perform its paste magic, so links will not be offered. Sorry.
LOL!
-
In this case,
path
. This is in keeping with Microsoft's convention for naming files.Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
What if it doesn't have a path, just the name of the file itself?
-
With programmers, nothing is "obvious" unless it's in the specs. I assumed that everyone would simply follow the guidelines from Microsoft, making this a non-question.
Bastard Programmer from Hell :suss:
Probably a dumb question, but where can I find the Microsoft guidelines for this? :(
-
Probably a dumb question, but where can I find the Microsoft guidelines for this? :(
-
Mostly
filename
But that's because I had to forcibly break myself of usingstrFilename
...Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
-
What if it doesn't have a path, just the name of the file itself?
-
Caydence wrote:
Probably a dumb question
It's not, but I'm glad to see that you rather make a "dumb" impression and get an answer than look intelligent and move on without one. Here they are[^] :)
Bastard Programmer from Hell :suss:
I don't mind admitting I don't know something. :)
-
What if it doesn't have a path, just the name of the file itself?
Then just filename. It's a standard concatenation and MS is fairly clear on naming for contractions like this; all lower case.
Forgive your enemies - it messes with their heads
"Mind bleach! Send me mind bleach!" - Nagy Vilmos
My blog | My articles | MoXAML PowerToys | Mole 2010 - debugging made easier - my favourite utility
-
With programmers, nothing is "obvious" unless it's in the specs. I assumed that everyone would simply follow the guidelines from Microsoft, making this a non-question.
Bastard Programmer from Hell :suss:
Eddy Vluggen wrote:
the guidelines from Microsoft
So, ummm... explain why
Hashtable
andDataTable
don't agree. :suss: