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

    public sealed class Int64Value : IMessage<Int64Value>, IEquatable<Int64Value>, IDeepCloneable<Int64Value>, IBufferMessage, IMessage

Wrapper message for `int64`.

The JSON representation for `Int64Value` is JSON string.

## Inheritance

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

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1)[Int64Value](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Int64Value), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Int64Value](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Int64Value), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1)[Int64Value](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Int64Value), [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.WellKnownTypes](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes)

## Assembly

Google.Protobuf.dll

## Constructors

### Int64Value()

    public Int64Value()

### Int64Value(Int64Value)

    public Int64Value(Int64Value other)

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

## Fields

### ValueFieldNumber

    public const int ValueFieldNumber = 1

Field number for the "value" field.

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

## Properties

### 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` |   |

### Parser

    public static MessageParser<Int64Value> 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.WellKnownTypes.Int64Value` |   |

### Value

    public long Value { get; set; }

The int64 value.

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

## 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. |

### Clone()

    public Int64Value Clone()

Creates a deep clone of this object.

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

### Equals(Int64Value)

    public bool Equals(Int64Value other)

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

| **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))

### 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)

### 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(Int64Value)

    public void MergeFrom(Int64Value 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.WellKnownTypes.Int64Value` |

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

### 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__)