# GrainStateWithMetaData&lt;TView&gt; Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.eventsourcing/orleans.eventsourcing.statestorage.grainstatewithmetadata-1/)

## FlipBit(string) {#flipbit-string-1b9c5676}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.eventsourcing/orleans.eventsourcing.statestorage.grainstatewithmetadata-1/methods/flipbit-string-1b9c5676/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.EventSourcing/StateStorage/GrainStateWithMetaData.cs#L130-L133)

```csharp
public bool FlipBit(string Replica)
```

toggle one of the bits in `Orleans.EventSourcing.StateStorage.GrainStateWithMetaData-1.WriteVector` and return the new value.

### Parameters

- `Replica` (`string`): The replica for which we want to flip the bit

### Returns

the state of the bit after flipping it

## GetBit(string) {#getbit-string-2fce7297}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.eventsourcing/orleans.eventsourcing.statestorage.grainstatewithmetadata-1/methods/getbit-string-2fce7297/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.EventSourcing/StateStorage/GrainStateWithMetaData.cs#L120)

```csharp
public bool GetBit(string Replica)
```

Gets one of the bits in `Orleans.EventSourcing.StateStorage.GrainStateWithMetaData-1.WriteVector`

### Parameters

- `Replica` (`string`): The replica for which we want to look up the bit
