Use of static methods

  • Thread starter Thread starter news.microsoft.com
  • Start date Start date
N

news.microsoft.com

Does anyone know if there is a performance hit in using static methods for
the majority of our function calls (we have no requirement for maintaining
object state between calls)
 
Yes.

There is none. If anything, it is SLIGHTLY faster, as one parameter less is
passed (this).

--
Regards

Thomas Tomiczek
THONA Software & Consulting Ltd.
(Microsoft MVP C#/.NET)
 
Manish Agarwal said:
yes, they are always loaded into memory

Well whatever methods are used are always going to be loaded into
memory, surely - what's special about static methods there?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top