Show / Hide Table of Contents

# Class RestBan

Represents a REST-based ban object.

##### Inheritance

System.Object
RestBan

##### Implements

IBan

##### Inherited Members

System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()

###### Namespace: Discord.Rest

###### Assembly: Discord.Net.Rest.dll

##### Syntax

    public class RestBan : IBan

### Properties

| Improve this Doc View Source

#### Reason

Gets the reason why the user is banned if specified.

##### Declaration

    public string Reason { get; }

##### Property Value

Type | Description
--- | ---
System.String | A string containing the reason behind the ban; `null` if none is specified.

| Improve this Doc View Source

#### User

Gets the banned user.

##### Declaration

    public RestUser User { get; }

##### Property Value

Type | Description
--- | ---
RestUser | A generic RestUser object that was banned.

### Methods

| Improve this Doc View Source

#### ToString()

Gets the name of the banned user.

##### Declaration

    public override string ToString()

##### Returns

Type | Description
--- | ---
System.String | A string containing the name of the user that was banned.

##### Overrides

System.Object.ToString()

### Explicit Interface Implementations

| Improve this Doc View Source

#### IBan.User

Gets the banned user.

##### Declaration

    IUser IBan.User { get; }

##### Returns

Type | Description
--- | ---
IUser | A user that was banned.

### Implements

IBan