Eran Betzalel
Eran Betzalel

Reputation: 4203

Is there OnLoad event for C# libraries?

I want to initialize my C# library as it loads by another process, is it possible and if so - how?

Upvotes: 5

Views: 2613

Answers (1)

SLaks
SLaks

Reputation: 888047

No.

Instead, you can add a static constructor to your class, which will execute the first time that the class is used.

Upvotes: 7

Related Questions