# Class FieldMask.MergeOptions (3.27.1)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [3.27.1 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.FieldMask.MergeOptions)
- [3.23.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/3.23.0/Google.Protobuf.WellKnownTypes.FieldMask.MergeOptions)
- [3.15.8](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/3.15.8/Google.Protobuf.WellKnownTypes.FieldMask.MergeOptions)

    public sealed class FieldMask.MergeOptions

Options to customize merging behavior.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> FieldMask.MergeOptions

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Protobuf.WellKnownTypes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes)

## Assembly

Google.Protobuf.dll

## Properties

### ReplaceMessageFields

    public bool ReplaceMessageFields { get; set; }

Whether to replace message fields(i.e., discard existing content in
destination message fields) when merging.
Default behavior is to merge the source message field into the
destination message field.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### ReplacePrimitiveFields

    public bool ReplacePrimitiveFields { get; set; }

Whether to replace primitive (non-repeated and non-message) fields in
destination message fields with the source primitive fields (i.e., if the
field is set in the source, the value is copied to the
destination; if the field is unset in the source, the field is cleared
from the destination) when merging.

Default behavior is to always set the value of the source primitive
field to the destination primitive field, and if the source field is
unset, the default value of the source field is copied to the
destination.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |

### ReplaceRepeatedFields

    public bool ReplaceRepeatedFields { get; set; }

Whether to replace repeated fields (i.e., discard existing content in
destination repeated fields) when merging.
Default behavior is to append elements from source repeated field to the
destination repeated field.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.boolean` |   |