# StringEncodedWriteVector.FlipBit(string, string)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.eventsourcing/orleans.eventsourcing.common.stringencodedwritevector/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.eventsourcing/orleans.eventsourcing.common.stringencodedwritevector/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.EventSourcing/Common/StringEncodedWriteVector.cs#L36-L48)

```csharp
public static bool FlipBit(ref string writeVector, string Replica)
```

toggle one of the bits in writeVector and return the new value.

### Parameters

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

### Returns

the state of the bit after flipping it
