Table of Contents

Method ToUri

Namespace
DSharpPlus.Net
Assembly
DSharpPlus.dll

ToUri()

Converts this DiscordUri into a canonical representation of a System.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.