Gets the value of the specified resource. The resource that is returned is localized for the specified culture. If the resource has not been localized for that culture, the resource that is returned is localized for a "best match" (this is accomplished via the culture's Parent property). Otherwise, a a null reference (in Visual Basic Nothing) reference is returned.
[Visual Basic] Overloads Overridable Public Function GetString( _ ByVal name As String, _ ByVal culture As CultureInfo _ ) As String [C#] public virtual string GetString( string name, CultureInfo culture ); [C++] public: virtual String* GetString( String* name, CultureInfo* culture ); [JScript] public function GetString( name : String, culture : CultureInfo ) : String;
The value of the resource localized for the specified culture. If a "best match" is not possible, a null reference (Nothing) is returned.
Exception Type | Condition |
---|---|
ArgumentNullException | If name is a null reference (Nothing) |
InvalidOperationException | If the value of the specified resource is not a String |
ResourceManager Class | ResourceManager Members | System.Resources Namespace | ResourceManager.GetString Overload List