There's no direct equivalence to this, however, you can create a static class (or at least a static constructor to some class) that will be executed when the class is used first:
public class MyLibraryFactory
{
static MyLibraryFactory()
{
// Add static initializer code here.
// it will be called when the class is first referenced or used.
}
}
This constructor will be called before any other method using that class. There's no guarantee that it is the first thing that is called inside the library, but the compiler ensures that anything else that executes inside your library is independent of this class, so you won't notice the difference.