# ActivationId Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.activationid/)

## Equals(ActivationId) {#equals-orleans-runtime-activationid-d50c5386}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.activationid/methods/equals-orleans-runtime-activationid-d50c5386/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/IDs/ActivationId.cs#L57)

```csharp
public bool Equals(ActivationId other)
```

Indicates whether the current object is equal to another object of the same type.

### Parameters

- `other` (`ActivationId`): An object to compare with this object.

### Returns

`true` if the current object is equal to the `other` parameter; otherwise, `false`.

## Equals(object?) {#equals-object-nullable-71e1f034}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.activationid/methods/equals-object-nullable-71e1f034/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/IDs/ActivationId.cs#L54)

```csharp
public override bool Equals(object? obj)
```

Indicates whether this instance and a specified object are equal.

### Parameters

- `obj` (`object?`): The object to compare with the current instance.

### Returns

`true` if `obj` and this instance are the same type and represent the same value; otherwise, `false`.

## FromParsableString(string) {#fromparsablestring-string-76a37120}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.activationid/methods/fromparsablestring-string-76a37120/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/IDs/ActivationId.cs#L83-L84)

```csharp
public static ActivationId FromParsableString(string activationId)
```

Parses a string representation of an activation id which was created using [ActivationId](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.activationid/).

### Parameters

- `activationId` (`string`): The string representation of the activation id.

### Returns

The activation id.

## GetDeterministic(GrainId) {#getdeterministic-orleans-runtime-grainid-8d022908}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.activationid/methods/getdeterministic-orleans-runtime-grainid-8d022908/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/IDs/ActivationId.cs#L46-L50)

```csharp
public static ActivationId GetDeterministic(GrainId grain)
```

Returns an activation id which has been computed deterministically and reproducibly from the provided grain id.

### Parameters

- `grain` (`GrainId`): The grain id.

### Returns

An activation id which has been computed deterministically and reproducibly from the provided grain id.

## GetHashCode {#gethashcode-fe075846}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.activationid/methods/gethashcode-fe075846/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/IDs/ActivationId.cs#L60)

```csharp
public override int GetHashCode()
```

Returns the hash code for this instance.

### Returns

A 32-bit signed integer that is the hash code for this instance.

## NewId {#newid-3d2ada4e}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.activationid/methods/newid-3d2ada4e/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/IDs/ActivationId.cs#L37)

```csharp
public static ActivationId NewId()
```

Returns a new, random activation id.

### Returns

A new, random activation id.

## ToParsableString {#toparsablestring-4c5a737b}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.activationid/methods/toparsablestring-4c5a737b/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/IDs/ActivationId.cs#L74)

```csharp
public string ToParsableString()
```

Returns a string representation of this activation id which can be parsed by [ActivationId](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.activationid/).

### Returns

A string representation of this activation id which can be parsed by [ActivationId](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.activationid/).

## ToString {#tostring-9fba1477}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.activationid/methods/tostring-9fba1477/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/IDs/ActivationId.cs#L63)

```csharp
public override string ToString()
```

Returns the fully qualified type name of this instance.

### Returns

The fully qualified type name.

## operator ==(ActivationId, ActivationId) {#op-equality-orleans-runtime-activationid-orleans-runtime-activationid-7213608d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.activationid/methods/op-equality-orleans-runtime-activationid-orleans-runtime-activationid-7213608d/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/IDs/ActivationId.cs#L93)

```csharp
public static bool operator ==(ActivationId left, ActivationId right)
```

Compares the provided operands for equality.

### Parameters

- `left` (`ActivationId`): The left operand.
- `right` (`ActivationId`): The right operand.

### Returns

`true` if the provided values are equal, otherwise `false`.

## operator !=(ActivationId, ActivationId) {#op-inequality-orleans-runtime-activationid-orleans-runtime-activationid-ebcaa2a9}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.runtime.activationid/methods/op-inequality-orleans-runtime-activationid-orleans-runtime-activationid-ebcaa2a9/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/IDs/ActivationId.cs#L101)

```csharp
public static bool operator !=(ActivationId left, ActivationId right)
```

Compares the provided operands for inequality.

### Parameters

- `left` (`ActivationId`): The left operand.
- `right` (`ActivationId`): The right operand.

### Returns

`true` if the provided values are not equal, otherwise `false`.
