@@ -199,8 +199,12 @@ if they fail due to a network or server error.
199199
200200You can explicitly disable retryable reads or retryable writes by setting the ``RetryReads``
201201or ``RetryWrites`` options on a ``MongoClientSettings`` object and passing this object to the
202- ``MongoClient`` constructor. The following example disables retryable reads and writes for
203- a client:
202+ ``MongoClient`` constructor. You can also set the ``retryReads`` or ``retryWrites`` options
203+ in a connection string.
204+
205+ The following example disables retryable reads and writes for
206+ a client. Select the :guilabel:`MongoClientSettings` or :guilabel:`Connection String`
207+ tab to see the corresponding code.
204208
205209.. literalinclude:: /includes/fundamentals/code-examples/ReplicaSetConfigs.cs
206210 :start-after: start-retry-reads-writes
@@ -209,6 +213,28 @@ a client:
209213 :language: csharp
210214 :dedent:
211215
216+ .. tabs::
217+
218+ .. tab:: MongoClientSettings
219+ :tabid: mongoclientsettings
220+
221+ .. literalinclude:: /includes/fundamentals/code-examples/ReplicaSetConfigs.cs
222+ :start-after: start-retry-reads-writes
223+ :end-before: end-retry-reads-writes
224+ :emphasize-lines: 2-3
225+ :language: csharp
226+ :dedent:
227+
228+ .. tab:: Connection String
229+ :tabid: connectionstring
230+
231+ .. literalinclude:: /includes/fundamentals/code-examples/ReplicaSetConfigs.cs
232+ :start-after: start-retry-reads-writes
233+ :end-before: end-retry-reads-writes
234+ :emphasize-lines: 1
235+ :language: csharp
236+ :dedent:
237+
212238To learn more about supported retryable read and retryable write operations, see
213239:manual:`Retryable Reads </core/retryable-reads/>`
214240and :manual:`Retryable Writes </core/retryable-writes/>` in the {+mdb-server+} manual.
0 commit comments