A Sandcastle Documented Class Library

# ILocalizationService TryGetString Method (CultureInfo, Guid, String, String )

Tries the get the localized string with the specified key for the specified culture.

Namespace: Dundas.BI
Assembly: Dundas.BI.Core (in Dundas.BI.Core.dll) Version: 2.0.0.0 (10.0.0.1002)
Syntax
C#
VB
C++
F#
Copy

    bool TryGetString(
    	CultureInfo culture,
    	Guid moduleId,
    	string key,
    	out string localizedString
    )

    Function TryGetString (
    	culture As CultureInfo,
    	moduleId As Guid,
    	key As String,
    	<OutAttribute> ByRef localizedString As String
    ) As Boolean

    bool TryGetString(
    	CultureInfo^ culture,
    	Guid moduleId,
    	String^ key,
    	[OutAttribute] String^% localizedString
    )

    abstract TryGetString :
            culture : CultureInfo *
            moduleId : Guid *
            key : string *
            localizedString : string byref -> bool

#### Parameters

culture
  Type: System.Globalization
  CultureInfo
  The culture for which to retrieve the string.
moduleId
  Type: System
  Guid
  The ID of the module for which the strings are registered.
key
  Type: System
  String
  When this method returns, contains the key of the string to look up.
localizedString
  Type: System
  String
  The localized string.

#### Return Value

Type: Boolean
if a localized string was found for the specified culture or one of its parent cultures; otherwise
.
Exceptions

Exception | Condition
--- | ---
ArgumentException | moduleId is Empty. -or- key is or empty.
ArgumentNullException | culture is .
FormatException | An invalid number of format arguments was provided.

See Also

#### Reference

ILocalizationService Interface
TryGetString Overload
Dundas.BI Namespace