Re: c# static constructor?
- From: "Oliver Sturm [MVP C#]" <oliver@xxxxxxxxxxxx>
- Date: Thu, 3 May 2007 17:20:39 +0100
Hi,
ms news group wrote:
I read one article that says static constructor can be a big performance
hit, it even gives some code fragment, which, accoring to that article,
could show a big difference betweeen using static constructor or not. But
when I run his code, I found no significant diifference at all.
Then you're either misunderstanding the article or the environment in which
you are running your test is not the same that the author of the article
was using.
Could someone shed some light on this?
Shed some light on what? Static constructors make an important bit of
functionality available to C# programmers. If you need that functionality,
use them. If not, don't. I've used countless static constructors myself and
I wouldn't stop doing so unless I encounter a scenario where it is clear
that they are not working for me. And even then I'd suspect that the
behaviour in question would rather be a bug than a design feature.
Oliver Sturm
--
http://www.sturmnet.org/blog - MVP C#
.
- Follow-Ups:
- Re: c# static constructor?
- From: ms news group
- Re: c# static constructor?
- References:
- c# static constructor?
- From: ms news group
- c# static constructor?
- Prev by Date: c# static constructor?
- Next by Date: Re: c# static constructor?
- Previous by thread: c# static constructor?
- Next by thread: Re: c# static constructor?
- Index(es):
Loading