Writes a new object to the space.
            
| C# | Visual Basic | Visual C++ | J# | 
ILeaseContext<T> Write<T>( T obj, long leaseTime )
Function Write(Of T) ( _ obj As T, _ leaseTime As Long _ ) As ILeaseContext(Of T)
generic<typename T> ILeaseContext<T>^ Write( T obj, long long leaseTime )
- T
 - Type of object to write.
 
- obj (T)
 - The object to write.
 
- leaseTime (Int64)
 - The requested lease time, in milliseconds.
 
A lease handle on successful write (null if NoWriteLease is set).
| Exception | Condition | 
|---|---|
| EntryAlreadyInSpaceException | An entry with matching ID exists in space (WriteModifiers.WriteOnly). | 
| EntryNotInSpaceException | An entry with matching ID does not exist in space (WriteModifiers.UpdateOnly). | 
| OperationTimeoutException | Timeout expired after waiting for a transactional proper matching entry (when using WriteModifiers.UpdateOrWrite). | 
| TransactionException | Transaction error occured. | 
| EntryVersionConflictException | Operation is rejected as a result of optimistic locking version conflict. | 
| InactiveSpaceException | The space is in backup mode and therefore is not active. | 
