# Class FieldOptions (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.Reflection.FieldOptions)
- [3.23.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/3.23.0/Google.Protobuf.Reflection.FieldOptions)
- [3.15.8](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/3.15.8/Google.Protobuf.Reflection.FieldOptions)

    public sealed class FieldOptions : IExtendableMessage<FieldOptions>, IMessage<FieldOptions>, IEquatable<FieldOptions>, IDeepCloneable<FieldOptions>, IBufferMessage, IMessage

## Inheritance

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

## Implements

[IExtendableMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IExtendableMessage-1)[FieldOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1)[FieldOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[FieldOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1)[FieldOptions](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage)

## Inherited Members

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

## Namespace

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

## Assembly

Google.Protobuf.dll

## Constructors

### FieldOptions()

    public FieldOptions()

### FieldOptions(FieldOptions)

    public FieldOptions(FieldOptions other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions` |

## Fields

### CtypeFieldNumber

    public const int CtypeFieldNumber = 1

Field number for the "ctype" field.

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

### DebugRedactFieldNumber

    public const int DebugRedactFieldNumber = 16

Field number for the "debug_redact" field.

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

### DeprecatedFieldNumber

    public const int DeprecatedFieldNumber = 3

Field number for the "deprecated" field.

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

### EditionDefaultsFieldNumber

    public const int EditionDefaultsFieldNumber = 20

Field number for the "edition_defaults" field.

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

### FeatureSupportFieldNumber

    public const int FeatureSupportFieldNumber = 22

Field number for the "feature_support" field.

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

### FeaturesFieldNumber

    public const int FeaturesFieldNumber = 21

Field number for the "features" field.

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

### JstypeFieldNumber

    public const int JstypeFieldNumber = 6

Field number for the "jstype" field.

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

### LazyFieldNumber

    public const int LazyFieldNumber = 5

Field number for the "lazy" field.

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

### PackedFieldNumber

    public const int PackedFieldNumber = 2

Field number for the "packed" field.

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

### RetentionFieldNumber

    public const int RetentionFieldNumber = 17

Field number for the "retention" field.

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

### TargetsFieldNumber

    public const int TargetsFieldNumber = 19

Field number for the "targets" field.

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

### UninterpretedOptionFieldNumber

    public const int UninterpretedOptionFieldNumber = 999

Field number for the "uninterpreted_option" field.

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

### UnverifiedLazyFieldNumber

    public const int UnverifiedLazyFieldNumber = 15

Field number for the "unverified_lazy" field.

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

### WeakFieldNumber

    public const int WeakFieldNumber = 10

Field number for the "weak" field.

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

## Properties

### Ctype

    public FieldOptions.Types.CType Ctype { get; set; }

The ctype option instructs the C++ code generator to use a different
representation of the field than it normally would. See the specific
options below. This option is only implemented to support use of
\[ctype=CORD\] and \[ctype=STRING\] (the default) on non-repeated fields of
type "bytes" in the open source release -- sorry, we'll try to include
other types in a future version!

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptionshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Types.CType` |   |

### DebugRedact

    public bool DebugRedact { get; set; }

Indicate that the field value should not be printed out when using debug
formats, e.g. when the field contains sensitive credentials.

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

### Deprecated

    public bool Deprecated { get; set; }

Is this field deprecated?
Depending on the target platform, this can emit Deprecated annotations
for accessors, or it will be completely ignored; in the very least, this
is a formalization for deprecating fields.

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

### Descriptor

    public static MessageDescriptor Descriptor { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.MessageDescriptor` |   |

### EditionDefaults

    public RepeatedField<FieldOptions.Types.EditionDefault> EditionDefaults { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptionshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Types.EditionDefault` |   |

### FeatureSupport

    public FieldOptions.Types.FeatureSupport FeatureSupport { get; set; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptionshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Types.FeatureSupport` |   |

### Features

    public FeatureSet Features { get; set; }

Any features defined in the specific edition.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FeatureSet` |   |

### HasCtype

    public bool HasCtype { get; }

Gets whether the "ctype" field is set

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

### HasDebugRedact

    public bool HasDebugRedact { get; }

Gets whether the "debug_redact" field is set

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

### HasDeprecated

    public bool HasDeprecated { get; }

Gets whether the "deprecated" field is set

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

### HasJstype

    public bool HasJstype { get; }

Gets whether the "jstype" field is set

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

### HasLazy

    public bool HasLazy { get; }

Gets whether the "lazy" field is set

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

### HasPacked

    public bool HasPacked { get; }

Gets whether the "packed" field is set

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

### HasRetention

    public bool HasRetention { get; }

Gets whether the "retention" field is set

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

### HasUnverifiedLazy

    public bool HasUnverifiedLazy { get; }

Gets whether the "unverified_lazy" field is set

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

### HasWeak

    public bool HasWeak { get; }

Gets whether the "weak" field is set

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

### Jstype

    public FieldOptions.Types.JSType Jstype { get; set; }

The jstype option determines the JavaScript type used for values of the
field. The option is permitted only for 64 bit integral and fixed types
(int64, uint64, sint64, fixed64, sfixed64). A field with jstype JS_STRING
is represented as JavaScript string, which avoids loss of precision that
can happen when a large value is converted to a floating point JavaScript.
Specifying JS_NUMBER for the jstype causes the generated JavaScript code to
use the JavaScript "number" type. The behavior of the default option
JS_NORMAL is implementation dependent.

This option is an enum to permit additional types to be added, e.g.
goog.math.Integer.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptionshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Types.JSType` |   |

### Lazy

    public bool Lazy { get; set; }

Should this field be parsed lazily? Lazy applies only to message-type
fields. It means that when the outer message is initially parsed, the
inner message's contents will not be parsed but instead stored in encoded
form. The inner message will actually be parsed when it is first accessed.

This is only a hint. Implementations are free to choose whether to use
eager or lazy parsing regardless of the value of this option. However,
setting this option true suggests that the protocol author believes that
using lazy parsing on this field is worth the additional bookkeeping
overhead typically needed to implement it.

This option does not affect the public interface of any generated code;
all method signatures remain the same. Furthermore, thread-safety of the
interface is not affected by this option; const methods remain safe to
call from multiple threads concurrently, while non-const methods continue
to require exclusive access.

Note that lazy message fields are still eagerly verified to check
ill-formed wireformat or missing required fields. Calling IsInitialized()
on the outer message would fail if the inner message has missing required
fields. Failed verification would result in parsing failure (except when
uninitialized messages are acceptable).

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

### Packed

    public bool Packed { get; set; }

The packed option can be enabled for repeated primitive fields to enable
a more efficient representation on the wire. Rather than repeatedly
writing the tag and type for each element, the entire array is encoded as
a single length-delimited blob. In proto3, only explicit setting it to
false will avoid using packed encoding. This option is prohibited in
Editions, but the `repeated_field_encoding` feature can be used to control
the behavior.

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

### Parser

    public static MessageParser<FieldOptions> Parser { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageParser-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions` |   |

### Retention

    public FieldOptions.Types.OptionRetention Retention { get; set; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptionshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Types.OptionRetention` |   |

### Targets

    public RepeatedField<FieldOptions.Types.OptionTargetType> Targets { get; }

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptionshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions.Types.OptionTargetType` |   |

### UninterpretedOption

    public RepeatedField<UninterpretedOption> UninterpretedOption { get; }

The parser stores options it doesn't recognize here. See above.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.UninterpretedOption` |   |

### UnverifiedLazy

    public bool UnverifiedLazy { get; set; }

unverified_lazy does no correctness checks on the byte stream. This should
only be used where lazy with verification is prohibitive for performance
reasons.

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

### Weak

    public bool Weak { get; set; }

For Google-internal migration only. Do not use.

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

## Methods

### CalculateSize()

    public int CalculateSize()

Calculates the size of this message in Protocol Buffer wire format, in bytes.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` | The number of bytes required to write this message to a coded output stream. |

### ClearCtype()

    public void ClearCtype()

Clears the value of the "ctype" field

### ClearDebugRedact()

    public void ClearDebugRedact()

Clears the value of the "debug_redact" field

### ClearDeprecated()

    public void ClearDeprecated()

Clears the value of the "deprecated" field

### ClearExtension\<TValue\>(Extension\<FieldOptions, TValue\>)

    public void ClearExtension<TValue>(Extension<FieldOptions, TValue> extension)

Clears the value of the specified extension

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `extension` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Extension-2https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions` |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `TValue` |   |

### ClearExtension\<TValue\>(RepeatedExtension\<FieldOptions, TValue\>)

    public void ClearExtension<TValue>(RepeatedExtension<FieldOptions, TValue> extension)

Clears the value of the specified repeated extension

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `extension` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.RepeatedExtension-2https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions` |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `TValue` |   |

### ClearJstype()

    public void ClearJstype()

Clears the value of the "jstype" field

### ClearLazy()

    public void ClearLazy()

Clears the value of the "lazy" field

### ClearPacked()

    public void ClearPacked()

Clears the value of the "packed" field

### ClearRetention()

    public void ClearRetention()

Clears the value of the "retention" field

### ClearUnverifiedLazy()

    public void ClearUnverifiedLazy()

Clears the value of the "unverified_lazy" field

### ClearWeak()

    public void ClearWeak()

Clears the value of the "weak" field

### Clone()

    public FieldOptions Clone()

Creates a deep clone of this object.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions` | A deep clone of this object. |

### Equals(FieldOptions)

    public bool Equals(FieldOptions other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions` |

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

### Equals(object)

    public override bool Equals(object other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://learn.microsoft.com/dotnet/api/system.object` |

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

**Overrides** [object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object))

### GetExtension\<TValue\>(Extension\<FieldOptions, TValue\>)

    public TValue GetExtension<TValue>(Extension<FieldOptions, TValue> extension)

Gets the value of the specified extension

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `extension` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Extension-2https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TValue` |   |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `TValue` |   |

### GetExtension\<TValue\>(RepeatedExtension\<FieldOptions, TValue\>)

    public RepeatedField<TValue> GetExtension<TValue>(RepeatedExtension<FieldOptions, TValue> extension)

Gets the value of the specified repeated extension or null if the extension isn't registered in this set.
For a version of this method that never returns null, use [GetOrInitializeExtension\<TValue\>(RepeatedExtension\<T, TValue\>)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IExtendableMessage-1#Google_Protobuf_IExtendableMessage_1_GetOrInitializeExtension__1_Google_Protobuf_RepeatedExtension__0___0__)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `extension` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.RepeatedExtension-2https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1` |   |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `TValue` |   |

### GetHashCode()

    public override int GetHashCode()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int32` |   |

**Overrides** [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)

### GetOrInitializeExtension\<TValue\>(RepeatedExtension\<FieldOptions, TValue\>)

    public RepeatedField<TValue> GetOrInitializeExtension<TValue>(RepeatedExtension<FieldOptions, TValue> extension)

Gets the value of the specified repeated extension, registering it if it hasn't already been registered.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `extension` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.RepeatedExtension-2https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1` |   |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `TValue` |   |

### HasExtension\<TValue\>(Extension\<FieldOptions, TValue\>)

    public bool HasExtension<TValue>(Extension<FieldOptions, TValue> extension)

Gets whether the value of the specified extension is set

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `extension` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Extension-2https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions` |

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

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `TValue` |   |

### MergeFrom(CodedInputStream)

    public void MergeFrom(CodedInputStream input)

Merges the data from the specified coded input stream with the current message.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `input` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.CodedInputStream` |

**Remarks** See the user guide for precise merge semantics.

### MergeFrom(FieldOptions)

    public void MergeFrom(FieldOptions other)

Merges the given message into this one.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions` |

**Remarks** See the user guide for precise merge semantics.

### SetExtension\<TValue\>(Extension\<FieldOptions, TValue\>, TValue)

    public void SetExtension<TValue>(Extension<FieldOptions, TValue> extension, TValue value)

Sets the value of the specified extension

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `extension` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Extension-2https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.FieldOptions` |
| `value` | `TValue` |

| **Type Parameter** ||
|---|---|
| **Name** | **Description** |
| `TValue` |   |

### ToString()

    public override string ToString()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

**Overrides** [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

### WriteTo(CodedOutputStream)

    public void WriteTo(CodedOutputStream output)

Writes the data to the given coded output stream.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `output` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.CodedOutputStream` Coded output stream to write the data to. Must not be null. |

## Extension Methods

[MessageExtensions.IsInitialized(IMessage)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_IsInitialized_Google_Protobuf_IMessage_) [MessageExtensions.MergeDelimitedFrom(IMessage, Stream)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeDelimitedFrom_Google_Protobuf_IMessage_System_IO_Stream_) [MessageExtensions.MergeFrom(IMessage, ByteString)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_Google_Protobuf_ByteString_) [MessageExtensions.MergeFrom(IMessage, ReadOnlySequence\<byte\>)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_Buffers_ReadOnlySequence_System_Byte__) [MessageExtensions.MergeFrom(IMessage, byte\[\])](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_Byte___) [MessageExtensions.MergeFrom(IMessage, byte\[\], int, int)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_Byte___System_Int32_System_Int32_) [MessageExtensions.MergeFrom(IMessage, Stream)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_IO_Stream_) [MessageExtensions.MergeFrom(IMessage, ReadOnlySpan\<byte\>)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_ReadOnlySpan_System_Byte__) [MessageExtensions.ToByteArray(IMessage)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_ToByteArray_Google_Protobuf_IMessage_) [MessageExtensions.ToByteString(IMessage)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_ToByteString_Google_Protobuf_IMessage_) [MessageExtensions.WriteDelimitedTo(IMessage, Stream)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_WriteDelimitedTo_Google_Protobuf_IMessage_System_IO_Stream_) [MessageExtensions.WriteTo(IMessage, IBufferWriter\<byte\>)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_WriteTo_Google_Protobuf_IMessage_System_Buffers_IBufferWriter_System_Byte__) [MessageExtensions.WriteTo(IMessage, Stream)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_WriteTo_Google_Protobuf_IMessage_System_IO_Stream_) [MessageExtensions.WriteTo(IMessage, Span\<byte\>)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_WriteTo_Google_Protobuf_IMessage_System_Span_System_Byte__)