dgorsman 发表于 2015-10-15 11:47:16


Yep, Glenn came from an arx background
... and the p represented pointer.
BUT I personally think the usage is redundant in C# .. we 'know' these particular variables represent Classes ( the 'knowledge' is from common usage).

gile 发表于 2015-10-15 13:29:46

My default is to spell it out with variables as camel casing, constants as all caps, and everything else as Pascal casing.The exception is everyday Autodesk variables, i.e. doc, db, bt, ms, tr, etc.
Prefixes like p, m, and _ are a C++ thing and I leave them there.

gile 发表于 2015-10-15 13:39:42

Personal quirk, but one thing I find annoying is prefixing everything with its type ie. intCounter, strName, dblDistance.When its well named and used rationally it should be rather obvious a counter will be an int not a string, a name will be a string not a double, or a distance will be a double not a bool.

JohnK 发表于 2015-10-15 16:45:38

@Se7en
Both Autodesk.AutoCAD.DatabaseServices and Autodesk.AutoCAD.GraphicInterface namespaces have a Polyline class.
页: 1 [2]
查看完整版本: variable names