[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eTransactionOptions\u003c/code\u003e class documentation is 3.10.0, part of the Google Cloud Firestore API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eTransactionOptions\u003c/code\u003e class, an immutable class, allows for setting parameters for executing transactions, and it inherits from the .NET object class.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides default transaction settings via the \u003ccode\u003eDefault\u003c/code\u003e property, accessible if the caller doesn't specify other settings.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eTransactionOptions\u003c/code\u003e features \u003ccode\u003eMaxAttempts\u003c/code\u003e and \u003ccode\u003eRetrySettings\u003c/code\u003e properties to define the number of attempts and the timing between them, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eForMaxAttempts\u003c/code\u003e and \u003ccode\u003eForRetrySettings\u003c/code\u003e methods allow creating custom \u003ccode\u003eTransactionOptions\u003c/code\u003e instances with specified maximum attempts and retry settings, respectively.\u003c/p\u003e\n"]]],[],null,["# Firestore API - Class TransactionOptions (3.10.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.10.0 (latest)](/dotnet/docs/reference/Google.Cloud.Firestore/latest/Google.Cloud.Firestore.TransactionOptions)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.9.0/Google.Cloud.Firestore.TransactionOptions)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.8.0/Google.Cloud.Firestore.TransactionOptions)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.7.0/Google.Cloud.Firestore.TransactionOptions)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.6.0/Google.Cloud.Firestore.TransactionOptions)\n- [3.5.1](/dotnet/docs/reference/Google.Cloud.Firestore/3.5.1/Google.Cloud.Firestore.TransactionOptions)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.4.0/Google.Cloud.Firestore.TransactionOptions)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.3.0/Google.Cloud.Firestore.TransactionOptions)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.2.0/Google.Cloud.Firestore.TransactionOptions)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.1.0/Google.Cloud.Firestore.TransactionOptions)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Firestore/3.0.0/Google.Cloud.Firestore.TransactionOptions)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Firestore/2.5.0/Google.Cloud.Firestore.TransactionOptions)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Firestore/2.4.0/Google.Cloud.Firestore.TransactionOptions)\n- [2.3.1](/dotnet/docs/reference/Google.Cloud.Firestore/2.3.1/Google.Cloud.Firestore.TransactionOptions) \n\n public sealed class TransactionOptions\n\nReference documentation and code samples for the Firestore API class TransactionOptions.\n\nImmutable class representing options for executing transactions. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e TransactionOptions \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Firestore](/dotnet/docs/reference/Google.Cloud.Firestore/latest/Google.Cloud.Firestore)\n\nAssembly\n--------\n\nGoogle.Cloud.Firestore.dll\n\nProperties\n----------\n\n### Default\n\n public static TransactionOptions Default { get; }\n\nThe transaction options that are used if nothing is specified by the caller.\n\n### MaxAttempts\n\n public int MaxAttempts { get; }\n\nThe number of times the transaction will be attempted before failing.\nThis is equivalent to [MaxAttempts](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.RetrySettings.html#Google_Api_Gax_Grpc_RetrySettings_MaxAttempts).\n\n### RetrySettings\n\n public RetrySettings RetrySettings { get; }\n\nThe settings to control the timing of retries within the transaction.\nThe [RetryFilter](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.RetrySettings.html#Google_Api_Gax_Grpc_RetrySettings_RetryFilter) property is ignored. This property is never null.\n\nMethods\n-------\n\n### ForMaxAttempts(int)\n\n public static TransactionOptions ForMaxAttempts(int maxAttempts)\n\nCreates an instance with the given maximum number of attempts. The default retry\ntiming will be used.\n\n### ForRetrySettings(RetrySettings)\n\n public static TransactionOptions ForRetrySettings(RetrySettings retrySettings)\n\nCreates an instance with the given retry settings, including maximum number of attempts.\nThe [RetryFilter](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.RetrySettings.html#Google_Api_Gax_Grpc_RetrySettings_RetryFilter) property is not used."]]