# RoleDefinition Methods

- Package: [Aspire.Hosting.Azure](/reference/api/csharp/aspire.hosting.azure.md)
- Type: [RoleDefinition](/reference/api/csharp/aspire.hosting.azure/roledefinition.md)
- Kind: `Methods`
- Members: `7`

Represents a role definition within an Azure resource.

## Deconstruct(string, string)

- Name: `Deconstruct(string, string)`

```csharp
public struct RoleDefinition
{
    public readonly void Deconstruct(
        out string Id,
        out string Name)
    {
        // ...
    }
}
```

## Parameters

- `Id` (`string`)
- `Name` (`string`)

## Equals(object)

- Name: `Equals(object)`
- Modifiers: `override`
- Returns: `bool`

Indicates whether this instance and a specified object are equal.

```csharp
public struct RoleDefinition
{
    public override readonly bool Equals(
        object obj)
    {
        // ...
    }
}
```

## Parameters

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

## Returns

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

## Equals(RoleDefinition)

- Name: `Equals(RoleDefinition)`
- Returns: `bool`

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

```csharp
public struct RoleDefinition
{
    public readonly bool Equals(
        RoleDefinition other)
    {
        // ...
    }
}
```

## Parameters

- `other` ([RoleDefinition](/reference/api/csharp/aspire.hosting.azure/roledefinition.md))
  An object to compare with this object.

## Returns

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

## GetHashCode

- Name: `GetHashCode`
- Modifiers: `override`
- Returns: `int`

Returns the hash code for this instance.

```csharp
public struct RoleDefinition
{
    public override readonly int GetHashCode()
    {
        // ...
    }
}
```

## Returns

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

## op_Equality(RoleDefinition, RoleDefinition)

- Name: `op_Equality(RoleDefinition, RoleDefinition)`
- Modifiers: `static`
- Returns: `bool`

```csharp
public struct RoleDefinition
{
    public static bool operator ==(
        RoleDefinition left,
        RoleDefinition right)
    {
        // ...
    }
}
```

## Parameters

- `left` ([RoleDefinition](/reference/api/csharp/aspire.hosting.azure/roledefinition.md))
- `right` ([RoleDefinition](/reference/api/csharp/aspire.hosting.azure/roledefinition.md))

## op_Inequality(RoleDefinition, RoleDefinition)

- Name: `op_Inequality(RoleDefinition, RoleDefinition)`
- Modifiers: `static`
- Returns: `bool`

```csharp
public struct RoleDefinition
{
    public static bool operator !=(
        RoleDefinition left,
        RoleDefinition right)
    {
        // ...
    }
}
```

## Parameters

- `left` ([RoleDefinition](/reference/api/csharp/aspire.hosting.azure/roledefinition.md))
- `right` ([RoleDefinition](/reference/api/csharp/aspire.hosting.azure/roledefinition.md))

## ToString

- Name: `ToString`
- Modifiers: `override`
- Returns: `string`

Returns the fully qualified type name of this instance.

```csharp
public struct RoleDefinition
{
    public override readonly string ToString()
    {
        // ...
    }
}
```

## Returns

`string` -- The fully qualified type name.
