Share via


ResourceManagerStringLocalizer.GetStringSafely(String, CultureInfo) Method

Definition

Gets a resource string from a ResourceManager and returns null instead of throwing exceptions if a match isn't found.

protected:
 System::String ^ GetStringSafely(System::String ^ name, System::Globalization::CultureInfo ^ culture);
protected string? GetStringSafely (string name, System.Globalization.CultureInfo? culture);
member this.GetStringSafely : string * System.Globalization.CultureInfo -> string
Protected Function GetStringSafely (name As String, culture As CultureInfo) As String

Parameters

name
String

The name of the string resource.

culture
CultureInfo

The CultureInfo to get the string for.

Returns

The resource string, or null if none was found.

Applies to