Constructor SetOnce
SetOnce()
A default constructor which does not set the internal object, and allows setting it by calling Set(T).
Declaration
public SetOnce()
SetOnce(T)
Creates a new instance with the internal object set to the given object. Note that any calls to Set(T) afterwards will result in AlreadySetException
Declaration
public SetOnce(T obj)
Parameters
Type | Name | Description |
---|---|---|
T | obj |
Exceptions
Type | Condition |
---|---|
AlreadySetException | if called more than once |