Digital Output - How to set the initial state

When creating an instance of a GPIO Pin is there anyway of setting the initial state of the pin?

A call to Write before changing the mode to output may work