Sets the boolean property value into a stream.
If the property is not a boolean, the method will throw an InvalidOperationException.
InvalidOperationException