Constructor MongoDuplicateKeyException
MongoDuplicateKeyException(ConnectionId, string, WriteConcernResult)
Initializes a new instance of the MongoDuplicateKeyException class.
public MongoDuplicateKeyException(ConnectionId connectionId, string message, WriteConcernResult commandResult)
Parameters
connectionId
ConnectionIdThe connection identifier.
message
stringThe error message.
commandResult
WriteConcernResultThe command result.
MongoDuplicateKeyException(SerializationInfo, StreamingContext)
Initializes a new instance of the MongoDuplicateKeyException class.
public MongoDuplicateKeyException(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfoThe SerializationInfo.
context
StreamingContextThe StreamingContext.