473,503 Members | 3,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

static method

Hi there,
Is that any known issue if I had created many class that have many static
methods?
Regards,
Gun
Apr 4 '07 #1
4 1760
Gunawan wrote:
Hi there,
Is that any known issue if I had created many class that have many
static methods?
What makes you wonder?

AFIAK, the answer is no.

-cd
Apr 4 '07 #2
I know there is a relation with the static method and the static
constructor, if I remeber it correctly, when you execute a static method of
a particular class for the first time it will execute the static constructor
too, where if you have loaded with many operation in the constructor it tend
to be little slow.. is this correct???

Nirosh.

"Carl Daniel [VC++ MVP]" <cp*****************************@mvps.org.nospam >
wrote in message news:uV**************@TK2MSFTNGP03.phx.gbl...
Gunawan wrote:
>Hi there,
Is that any known issue if I had created many class that have many
static methods?

What makes you wonder?

AFIAK, the answer is no.

-cd


Apr 4 '07 #3
On Apr 4, 8:58 am, "L.W.C. Nirosh" <t...@test.comwrote:
I know there is a relation with the static method and the static
constructor, if I remeber it correctly, when you execute a static method of
a particular class for the first time it will execute the static constructor
too, where if you have loaded with many operation in the constructor it tend
to be little slow.. is this correct???
That's not particularly related to static methods. When you do almost
anything with a class which has a static constructor in, it will call
the static constructor the first time. Usually that will be calling a
static method or creating an instance.

Jon

Apr 4 '07 #4
oh! yes..

"Jon Skeet [C# MVP]" <sk***@pobox.comwrote in message
news:11**********************@l77g2000hsb.googlegr oups.com...
On Apr 4, 8:58 am, "L.W.C. Nirosh" <t...@test.comwrote:
>I know there is a relation with the static method and the static
constructor, if I remeber it correctly, when you execute a static method
of
a particular class for the first time it will execute the static
constructor
too, where if you have loaded with many operation in the constructor it
tend
to be little slow.. is this correct???

That's not particularly related to static methods. When you do almost
anything with a class which has a static constructor in, it will call
the static constructor the first time. Usually that will be calling a
static method or creating an instance.

Jon

Apr 4 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
15364
by: Murat Tasan | last post by:
so here is another general question about java... why can't you declare an abstract static method. i can envision the case (indeed i have experienced the case) where one would want an...
5
15334
by: Chris | last post by:
Hi I have a scenario where I've created another AppDomain to dynamically load a DLL(s) into. In this newly loaded DLL I want to call a static method on a class. The problem arise is that I have...
1
2183
by: baylor | last post by:
In C#, an interface cannot mark any method as static. i'm told the ILASM supports it but i've never tested that Two questions. First, why? OK, i've heard the reason about interfaces being...
3
2088
by: Jay | last post by:
Why are there static methods in C#. In C++ static was applied to data only (I believe) and it meant that the static piece of data was not a part of the object but only a part of the class (one...
8
2045
by: Fernando Lopes | last post by:
Hi there! Someone has some code sample about when is recommend use a statis method? I know this methos don't want to be initialized and all but I want to know when I need to use it. Tks....
4
1854
by: Dave | last post by:
I used the following class and .aspx code below to understand how static works on variables and methods taken from...
2
2639
by: superseed | last post by:
Hi, I'm pretty new to C#, and I'm quite stuck on the following problem. I would like to add to my application a Windows.Form (singleton) on which I could display a message of one of the...
11
3795
by: Kevin Prichard | last post by:
Hi all, I've recently been following the object-oriented techiques discussed here and have been testing them for use in a web application. There is problem that I'd like to discuss with you...
9
5829
by: Steve Richter | last post by:
in a generic class, can I code the class so that I can call a static method of the generic class T? In the ConvertFrom method of the generic TypeConvert class I want to write, I have a call to...
4
3341
by: Steffen Bobek | last post by:
Extension methods are made for use with instances. I'd like to "misuse" them as static methods, too. Let me tell you my ambition: I use an extension method to serialize objects somehow like this:...
0
7192
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7064
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5559
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4665
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
369
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.