Table of Contents

Method ToUri

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

ToUri()

Converts this DiscordUri into a canonical representation of a Uri if it can be represented as such, throwing an exception otherwise.

public Uri ToUri()

Returns

Uri

A canonical representation of this DiscordUri.

Exceptions

UriFormatException

If Type is not Standard, as that would mean creating an invalid Uri, which would result in loss of data.