|
Actually, in this case I find filename easier to read than fileName.
|
|
|
|
|
I prefer filename .
However, in public APIs, I name properties FileName and UserName in keeping with Microsoft's convention.
/ravi
|
|
|
|
|
Properties would start with a capital-letter, but a variable wouldn't
Locals are usually Pascal-cased.
Bastard Programmer from Hell
|
|
|
|
|
Yes, I know. I was referring to the case of the letters within the identifier. I thought that was blindingly obvious.
/ravi
|
|
|
|
|
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
|
|
|
|
|
Probably a dumb question, but where can I find the Microsoft guidelines for this?
|
|
|
|
|
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
|
|
|
|
|
I don't mind admitting I don't know something.
|
|
|
|
|
|
VS' Code Analysis' built-in dictionary checks your identifiers for spelling, grammatical case and other naming conventions of the .NET Framework guidelines. It's a great a way to gets started, and it's easy to modify/override spellings and naming conventions where necessary.
/ravi
|
|
|
|
|
Eddy Vluggen wrote: the guidelines from Microsoft
So, ummm... explain why Hashtable and DataTable don't agree.
|
|
|
|
|
I'm not an employee, and I didn't claim it was consistent. It is however, always a good starting place for ideas, and a good place to end discussions.
Bastard Programmer from Hell
|
|
|
|
|
That's because one is a republican and the other, a democrat.
|
|
|
|
|
Mostly filename
But that's because I had to forcibly break myself of using strFilename ...
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Did you used to have lots of lngFilename or blnFilenames as well?
Bastard Programmer from Hell
|
|
|
|
|
I saw a variable declared as longAss. Ass was short for assignment no.
|
|
|
|
|
That'd be a bigAss in Sql Server types
Bastard Programmer from Hell
|
|
|
|
|
|
In this case, path . This is in keeping with Microsoft's convention for naming files.
|
|
|
|
|
now do you use "filepath" or "filePath"?
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.
|
|
|
|
|
|
What if it doesn't have a path, just the name of the file itself?
|
|
|
|
|
fileName and filenameAndPath .
Meh..
..is that with or without extension? A UNC-path, or local?
Bastard Programmer from Hell
|
|
|
|
|
Then just filename. It's a standard concatenation and MS is fairly clear on naming for contractions like this; all lower case.
|
|
|
|
|
'filename' (or 'Filename' if it's a property or 'DoSomethingWithFilename' etc) for me. I think of filename as a single composite word.
|
|
|
|