Method OpenUrl
OpenUrl(string)
Opens the specified URL in the default web browser using a platform-specific mechanism.
public static void OpenUrl(string url)
Parameters
urlstringThe URL to open. Must be a well-formed absolute URI with an allowed scheme.
Remarks
Only URLs whose scheme is listed in SafeSchemes (http, https, mailto by
default) are opened. URLs with any other scheme (e.g. file, ftp, or Windows protocol
handlers such as ms-msdt) are silently ignored.
On Windows, uses UseShellExecute so the URL is dispatched directly by the
OS shell without passing through cmd.exe. On macOS, uses open. On Linux, uses
xdg-open.
Any exception thrown by the underlying process launch (e.g. no default browser registered, permission denied) is caught and logged via Warning(string, string, string); the method never propagates such exceptions to the caller.
Callers that populate Url from untrusted input (markdown, RSS feeds, network data, etc.) must ensure the value is validated before it reaches this method.