What are all the most common method / variable / class names that you use?

Most common method / variable / class names that you use frequently and that explain the intent to you clearly and precisely. Is there any pattern you are using to figure this out.

+2


source to share


3 answers


int i = 0;



I think.

+2


source


object sender, EventArgs e



+1


source


These are not generic names, but generic naming patterns which I think you need

So I am trying to get the variables to mean something

successfulTransmissionCount

widgetUnitPrice

unusedSessionTimeout

      

But then, in cases where there is room for ambiguity, I can use the "units" suffix. If I am dealing with two existing APIs that run in seconds and that run in milliseconds it really helps my eyes to remind the units

 long unusedSessionTimeoutMillis

      

(Yes, there are alternatives to using the original primitive types that can give the same effect)

0


source







All Articles