0

I want to know how are static class Instantiated. I mean according to OOPS concepts no class can be used without instantiating it. But still we can use static classes without instantiating it, so when and how does static classes get instantiated.

Edited-------

Also I am confuse about the constructor calls when I am inheriting an abstract class and I make a instance of child class. can anyone explain me that also.

Thanks in Advance.

4

1 に答える 1

1

メカニズムはフレームワークごとに異なりますが、.Netの世界では、型が初期化されるときに静的コンストラクターが呼び出されます。開発者はコンストラクターが呼び出されるタイミングを直接制御できないことを覚えておくことが重要です。フレームワークの特定のバージョンの特定の実装に依存することは危険です。

于 2011-05-06T09:28:24.130 に答える