471,315 Members | 1,467 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,315 software developers and data experts.

Static method use

Hi All,

Is it advisable to make the method static if it is widely used in the
system? Will it increase the performance or decrease the performance?

Thanks,
Biren

Feb 9 '06 #1
1 1002
Biren Prajapati <se*********@gmail.com> wrote:
Is it advisable to make the method static if it is widely used in the
system? Will it increase the performance or decrease the performance?


It's unlikely to have any significant effect on performance. You should
make the method static or an instance method depending on whether it
logically acts on an instance or not. Think of maintainability,
readability and good design first - you can fix performance of things
like this if and when it becomes an issue. (Architecture is hard to
optimise later on - code is relatively easy.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Feb 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Jay | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.