# StringEncodedWriteVector Methods

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

## FlipBit(string, string) {#flipbit-ref-string-string-bb1f30b7}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.eventsourcing/orleans.eventsourcing.common.stringencodedwritevector/methods/flipbit-ref-string-string-bb1f30b7/)

[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

## GetBit(string, string) {#getbit-string-string-b7b5dbb5}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.eventsourcing/orleans.eventsourcing.common.stringencodedwritevector/methods/getbit-string-string-b7b5dbb5/)

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

```csharp
public static bool GetBit(string writeVector, string Replica)
```

Gets one of the bits in writeVector

### Parameters

- `writeVector` (`string`): The write vector which we want get the bit from
- `Replica` (`string`): The replica for which we want to look up the bit
