What is the cost of object creating.

Posted by Tony on Stack Overflow See other posts from Stack Overflow or by Tony
Published on 2010-04-22T12:50:17Z Indexed on 2010/04/22 12:53 UTC
Read the original article Hit count: 204

Filed under:
|
|

Hi

If I have to choose between static method and creating an instance and use instance method, I will choose static methods always. but what is the detailed overhead of creating an instance?

for example I saw a DAL which can be done with static classes but they choose to make it instance now in the BLL at every single call they call something like.

new Customer().GetData();

how far this can be bad?

Thanks

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about Performance