Table of Contents

Method StringFromUrlOrNull

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

StringFromUrlOrNull(string, Encoding?)

Loads a string from the specified resource URL or returns null if failed.

public static string? StringFromUrlOrNull(string url, Encoding? encoding = null)

Parameters

url string

The resource URL used to load the data.

encoding Encoding

The encoding to use for reading the stream. Optional. If not specified, UTF8 is used.

Returns

string

The string loaded from the URL, or null if an error occurs.