Dela via


Cmdlet.GetResourceString(String, String) Method

Definition

Gets the resource string corresponding to baseName and resourceId from the current assembly. You should override this if you require a different behavior.

public:
 virtual System::String ^ GetResourceString(System::String ^ baseName, System::String ^ resourceId);
public:
 virtual Platform::String ^ GetResourceString(Platform::String ^ baseName, Platform::String ^ resourceId);
 virtual std::wstring GetResourceString(std::wstring const & baseName, std::wstring const & resourceId);
public virtual string GetResourceString (string baseName, string resourceId);
abstract member GetResourceString : string * string -> string
override this.GetResourceString : string * string -> string
Public Overridable Function GetResourceString (baseName As String, resourceId As String) As String

Parameters

baseName
String

The base resource name.

resourceId
String

The resource id.

Returns

The resource string corresponding to baseName and resourceId.

Exceptions

Invalid baseName or resourceId, or string not found in resources

Remarks

This behavior may be used when the Cmdlet specifies HelpMessageBaseName and HelpMessageResourceId when defining ParameterAttribute, or when it uses the ErrorDetails constructor variants which take baseName and resourceId.

Applies to

See also