Passionate programmer
Passionate programmer

Reputation: 5898

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

Most common method/variable/class names that you use often and that explain you intent clearly and precisely.Is there any pattern you follow to figure that out.

Upvotes: 2

Views: 802

Answers (3)

wefwfwefwe
wefwfwefwe

Reputation: 3518

object sender, EventArgs e

Upvotes: 1

djna
djna

Reputation: 55907

It's not common names, but common patterns of names I think you need

So I try to make the variables mean something

successfulTransmissionCount

widgetUnitPrice

unusedSessionTimeout

But then on occasions, where there is scope for ambiguity I may use a "units" suffix. If I'm dealing with two existing APIs one that works in seconds and one that works in milliseconds it really helps my eyes to be reminded of the units

 long unusedSessionTimeoutMillis

(Yes there are alternatives to using raw primitive types that may give the same effect)

Upvotes: 0

Kyle Rosendo
Kyle Rosendo

Reputation: 25277

int i = 0;

I guess.

Upvotes: 2

Related Questions